6 use HTTP::Request::Common;
12 use Catalyst::Test 'SessionTestApp';
15 ($res, $c) = ctx_request(POST 'http://localhost/login', [username => 'bob', password => 's00p3r', remember => 1]);
16 is($res->code, 200, 'succeeded');
17 my $cookie = $res->header('Set-Cookie');
18 ok($cookie, 'Have a cookie');
20 # this checks that cookie persists across a redirect
21 ($res, $c) = ctx_request(GET 'http://localhost/logout_persist', Cookie => $cookie);
22 is($res->code, 302, '/logout with cookie redirects');
23 is($res->header('Location'), 'http://localhost/', 'Redirect to / after logout');
24 ok($res->header('Set-Cookie'), 'Cookie is reset by /logout');