4 use RT::Test tests => 12;
6 my ($baseurl, $agent) = RT::Test->started_ok;
8 my $url = $agent->rt_base_url;
9 diag $url if $ENV{TEST_VERBOSE};
11 # test that logout would actually redirects to the correct URL
13 ok $agent->login, "logged in";
14 $agent->follow_link_ok({ text => 'Logout' });
15 like $agent->uri, qr'/Logout\.html$', "right url";
16 $agent->content_contains('<meta http-equiv="refresh" content="1;URL=/"', "found the expected meta-refresh");
19 # Stop server and set MasonLocalComponentRoot
20 RT::Test->stop_server;
22 RT->Config->Set(MasonLocalComponentRoot => RT::Test::get_abs_relocatable_dir('html'));
24 ($baseurl, $agent) = RT::Test->started_ok;
26 $url = $agent->rt_base_url;
27 diag $url if $ENV{TEST_VERBOSE};
29 # test that logout would actually redirects to URL from the callback
31 ok $agent->login, "logged in";
32 $agent->follow_link_ok({ text => 'Logout' });
33 like $agent->uri, qr'/Logout\.html$', "right url";
34 $agent->content_contains('<meta http-equiv="refresh" content="1;URL=http://bestpractical.com/rt"', "found the expected meta-refresh");