[Rt-commit] rt branch 4.4/test-logout-direct-response created. rt-4.4.5-101-g5e4c444125
BPS Git Server
git at git.bestpractical.com
Tue May 3 17:48:23 UTC 2022
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".
The branch, 4.4/test-logout-direct-response has been created
at 5e4c44412546ab8f4dcdffa9377974ce9c00e058 (commit)
- Log -----------------------------------------------------------------
commit 5e4c44412546ab8f4dcdffa9377974ce9c00e058
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed May 4 01:17:55 2022 +0800
Make sure to not redirect for logout direct response tests
LWP auto redirects on meta-refresh since 6.63, of which behavior we need
to get around in tests.
diff --git a/t/web/login.t b/t/web/login.t
index 862782a0cc..0292b3ae35 100644
--- a/t/web/login.t
+++ b/t/web/login.t
@@ -41,8 +41,11 @@ diag "normal login";
$m->title_is( 'RT at a glance', 'logged in' );
+ my $max_redirect = $m->max_redirect;
+ $m->max_redirect(0);
$m->follow_link_ok( { text => 'Logout' }, 'follow logout' );
$m->title_is( 'Logout', 'logout' );
+ $m->max_redirect($max_redirect);
}
diag "tangent login";
diff --git a/t/web/logout.t b/t/web/logout.t
index 73ff25c33d..34bfabb9f7 100644
--- a/t/web/logout.t
+++ b/t/web/logout.t
@@ -11,6 +11,7 @@ diag $url if $ENV{TEST_VERBOSE};
# test that logout would actually redirects to the correct URL
{
ok $agent->login, "logged in";
+ $agent->max_redirect(0);
$agent->follow_link_ok({ text => 'Logout' });
like $agent->uri, qr'/Logout\.html$', "right url";
$agent->content_contains('<meta http-equiv="refresh" content="1;URL=/"', "found the expected meta-refresh");
@@ -29,6 +30,7 @@ diag $url if $ENV{TEST_VERBOSE};
# test that logout would actually redirects to URL from the callback
{
ok $agent->login, "logged in";
+ $agent->max_redirect(0);
$agent->follow_link_ok({ text => 'Logout' });
like $agent->uri, qr'/Logout\.html$', "right url";
$agent->content_contains('<meta http-equiv="refresh" content="1;URL=http://bestpractical.com/rt"', "found the expected meta-refresh");
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list