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