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