diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-03-04 07:00:14 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-03-04 07:00:14 +0100 |
commit | c41e15a1fb16e6f770b9381c6b5be79a63984330 (patch) | |
tree | d62beed08cdf583db1676d7d4ce00b59d291751b | |
parent | be8e30324789b8babbbc02e0415ca844407adb41 (diff) |
update tests
-rw-r--r-- | t/22-transit-visibility.t | 40 | ||||
-rw-r--r-- | t/23-journey-visibility.t | 16 | ||||
-rw-r--r-- | t/24-past-visibility.t | 16 |
3 files changed, 36 insertions, 36 deletions
diff --git a/t/22-transit-visibility.t b/t/22-transit-visibility.t index 90f57d1..8a68f5c 100644 --- a/t/22-transit-visibility.t +++ b/t/22-transit-visibility.t @@ -108,10 +108,10 @@ sub test_intransit_visibility { $opt{effective_visibility_str}, $desc ); if ( $opt{public} ) { - $t->get_ok('/status/test1')->status_is(200)->content_like(qr{DPN 667}); + $t->get_ok('/status/test1')->status_is(200)->content_like(qr{DPN\s*667}); $t->get_ok('/ajax/status/test1.html')->status_is(200) - ->content_like(qr{DPN 667}); - $t->get_ok('/p/test1')->status_is(200)->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); + $t->get_ok('/p/test1')->status_is(200)->content_like(qr{DPN\s*667}); } else { $t->get_ok('/status/test1')->status_is(200) @@ -124,9 +124,9 @@ sub test_intransit_visibility { if ( $opt{with_token} ) { $t->get_ok("/status/test1/$token")->status_is(200) - ->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); $t->get_ok("/ajax/status/test1.html?token=$j_token")->status_is(200) - ->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); } else { $t->get_ok("/status/test1/$token")->status_is(200) @@ -142,10 +142,10 @@ sub test_intransit_visibility { # users can see their own status if visibility is >= followrs if ( $opt{effective_visibility} >= 60 ) { - $t->get_ok('/status/test1')->status_is(200)->content_like(qr{DPN 667}); + $t->get_ok('/status/test1')->status_is(200)->content_like(qr{DPN\s*667}); $t->get_ok('/ajax/status/test1.html')->status_is(200) - ->content_like(qr{DPN 667}); - $t->get_ok('/p/test1')->status_is(200)->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); + $t->get_ok('/p/test1')->status_is(200)->content_like(qr{DPN\s*667}); } else { $t->get_ok('/status/test1')->status_is(200) @@ -159,9 +159,9 @@ sub test_intransit_visibility { # users can see their own status with token if visibility is >= unlisted if ( $opt{effective_visibility} >= 30 ) { $t->get_ok("/status/test1/$token")->status_is(200) - ->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); $t->get_ok("/ajax/status/test1.html?token=$j_token")->status_is(200) - ->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); } else { $t->get_ok("/status/test1/$token")->status_is(200) @@ -178,10 +178,10 @@ sub test_intransit_visibility { # uid2 can see uid1 if visibility is >= followers if ( $opt{effective_visibility} >= 60 ) { - $t->get_ok('/status/test1')->status_is(200)->content_like(qr{DPN 667}); + $t->get_ok('/status/test1')->status_is(200)->content_like(qr{DPN\s*667}); $t->get_ok('/ajax/status/test1.html')->status_is(200) - ->content_like(qr{DPN 667}); - $t->get_ok('/p/test1')->status_is(200)->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); + $t->get_ok('/p/test1')->status_is(200)->content_like(qr{DPN\s*667}); } else { $t->get_ok('/status/test1')->status_is(200) @@ -195,9 +195,9 @@ sub test_intransit_visibility { # uid2 can see uid1 with token if visibility is >= unlisted if ( $opt{effective_visibility} >= 30 ) { $t->get_ok("/status/test1/$token")->status_is(200) - ->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); $t->get_ok("/ajax/status/test1.html?token=$j_token")->status_is(200) - ->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); } else { $t->get_ok("/status/test1/$token")->status_is(200) @@ -214,10 +214,10 @@ sub test_intransit_visibility { # uid3 can see uid1 if visibility is >= travelynx if ( $opt{effective_visibility} >= 80 ) { - $t->get_ok('/status/test1')->status_is(200)->content_like(qr{DPN 667}); + $t->get_ok('/status/test1')->status_is(200)->content_like(qr{DPN\s*667}); $t->get_ok('/ajax/status/test1.html')->status_is(200) - ->content_like(qr{DPN 667}); - $t->get_ok('/p/test1')->status_is(200)->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); + $t->get_ok('/p/test1')->status_is(200)->content_like(qr{DPN\s*667}); } else { $t->get_ok('/status/test1')->status_is(200) @@ -231,9 +231,9 @@ sub test_intransit_visibility { # uid3 can see uid1 with token if visibility is >= unlisted if ( $opt{effective_visibility} >= 30 ) { $t->get_ok("/status/test1/$token")->status_is(200) - ->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); $t->get_ok("/ajax/status/test1.html?token=$j_token")->status_is(200) - ->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); } else { $t->get_ok("/status/test1/$token")->status_is(200) diff --git a/t/23-journey-visibility.t b/t/23-journey-visibility.t index 58b305a..1cc7e64 100644 --- a/t/23-journey-visibility.t +++ b/t/23-journey-visibility.t @@ -111,7 +111,7 @@ sub test_journey_visibility { if ( $opt{public} ) { $t->get_ok("/p/test1/j/$jid")->status_is(200) - ->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); } else { $t->get_ok("/p/test1/j/$jid")->status_is(404) @@ -120,7 +120,7 @@ sub test_journey_visibility { if ( $opt{with_token} ) { $t->get_ok("/p/test1/j/$jid$token")->status_is(200) - ->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); } else { $t->get_ok("/p/test1/j/$jid$token")->status_is(404) @@ -135,7 +135,7 @@ sub test_journey_visibility { # users can see their own status if visibility is >= followrs if ( $opt{effective_visibility} >= 60 ) { $t->get_ok("/p/test1/j/$jid")->status_is(200) - ->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); } else { $t->get_ok("/p/test1/j/$jid")->status_is(404) @@ -145,7 +145,7 @@ sub test_journey_visibility { # users can see their own status with token if visibility is >= unlisted if ( $opt{effective_visibility} >= 30 ) { $t->get_ok("/p/test1/j/$jid$token")->status_is(200) - ->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); } else { $t->get_ok("/p/test1/j/$jid$token")->status_is(404) @@ -161,7 +161,7 @@ sub test_journey_visibility { # uid2 can see uid1 if visibility is >= followers if ( $opt{effective_visibility} >= 60 ) { $t->get_ok("/p/test1/j/$jid")->status_is(200) - ->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); } else { $t->get_ok("/p/test1/j/$jid")->status_is(404) @@ -171,7 +171,7 @@ sub test_journey_visibility { # uid2 can see uid1 with token if visibility is >= unlisted if ( $opt{effective_visibility} >= 30 ) { $t->get_ok("/p/test1/j/$jid$token")->status_is(200) - ->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); } else { $t->get_ok("/p/test1/j/$jid$token")->status_is(404) @@ -187,7 +187,7 @@ sub test_journey_visibility { # uid3 can see uid1 if visibility is >= travelynx if ( $opt{effective_visibility} >= 80 ) { $t->get_ok("/p/test1/j/$jid")->status_is(200) - ->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); } else { $t->get_ok("/p/test1/j/$jid")->status_is(404) @@ -197,7 +197,7 @@ sub test_journey_visibility { # uid3 can see uid1 with token if visibility is >= unlisted if ( $opt{effective_visibility} >= 30 ) { $t->get_ok("/p/test1/j/$jid$token")->status_is(200) - ->content_like(qr{DPN 667}); + ->content_like(qr{DPN\s*667}); } else { $t->get_ok("/p/test1/j/$jid$token")->status_is(404) diff --git a/t/24-past-visibility.t b/t/24-past-visibility.t index 935ab6c..cf981b9 100644 --- a/t/24-past-visibility.t +++ b/t/24-past-visibility.t @@ -116,11 +116,11 @@ sub test_history_visibility { if ( $opt{public} ) { $t->get_ok('/p/test1')->status_is(200) - ->content_like( qr{DPN 667}, "public $desc" ); + ->content_like( qr{DPN\s*667}, "public $desc" ); } else { $t->get_ok('/p/test1')->status_is(200) - ->content_unlike( qr{DPN 667}, "public $desc" ); + ->content_unlike( qr{DPN\s*667}, "public $desc" ); } login( @@ -130,11 +130,11 @@ sub test_history_visibility { if ( $opt{self} ) { $t->get_ok('/p/test1')->status_is(200) - ->content_like( qr{DPN 667}, "self $desc" ); + ->content_like( qr{DPN\s*667}, "self $desc" ); } else { $t->get_ok('/p/test1')->status_is(200) - ->content_unlike( qr{DPN 667}, "self $desc" ); + ->content_unlike( qr{DPN\s*667}, "self $desc" ); } logout(); @@ -145,11 +145,11 @@ sub test_history_visibility { if ( $opt{followers} ) { $t->get_ok('/p/test1')->status_is(200) - ->content_like( qr{DPN 667}, "follower $desc" ); + ->content_like( qr{DPN\s*667}, "follower $desc" ); } else { $t->get_ok('/p/test1')->status_is(200) - ->content_unlike( qr{DPN 667}, "follower $desc" ); + ->content_unlike( qr{DPN\s*667}, "follower $desc" ); } logout(); @@ -160,11 +160,11 @@ sub test_history_visibility { if ( $opt{travelynx} ) { $t->get_ok('/p/test1')->status_is(200) - ->content_like( qr{DPN 667}, "travelynx $desc" ); + ->content_like( qr{DPN\s*667}, "travelynx $desc" ); } else { $t->get_ok('/p/test1')->status_is(200) - ->content_unlike( qr{DPN 667}, "travelynx $desc" ); + ->content_unlike( qr{DPN\s*667}, "travelynx $desc" ); } logout(); |