Commit | Line | Data |
51ef6cb3 |
1 | #!perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
6 | use FindBin; |
7 | use lib "$FindBin::Bin/lib"; |
8 | |
9 | use Test::More tests => 4; |
10 | use Catalyst::Test 'TestApp'; |
11 | |
12 | TestApp->config->{require_ssl} = { |
13 | no_cache => 1, |
14 | }; |
15 | |
16 | # test an SSL redirect |
17 | ok( my $res = request('http://localhost/ssl/secured'), 'request ok' ); |
18 | is( $res->code, 302, 'redirect code ok' ); |
19 | is( $res->header('location'), 'https://localhost/ssl/secured', 'redirect uri ok' ); |
20 | |
21 | # test that the http/https server info wasn't cached |
22 | ok( !TestApp->config->{https}, 'domain was not cached' ); |