Commit | Line | Data |
5b9187af |
1 | #!perl |
6bc86362 |
2 | use strict; |
3 | use warnings; |
4 | use lib 'lib'; |
5 | use Test::More; |
6 | |
689c5a5d |
7 | BEGIN { |
8 | eval { |
9 | require Catalyst::Plugin::Session; |
10 | require Catalyst::Plugin::Session::State::Cookie; |
11 | }; |
6bc86362 |
12 | |
689c5a5d |
13 | if ($@) { |
14 | diag($@); |
15 | plan skip_all => "Need Catalyst::Plugin::Session to run this test"; |
16 | exit 0; |
17 | } |
6bc86362 |
18 | } |
19 | use lib 't/lib'; |
20 | use Test::WWW::Mechanize::Catalyst 'CattySession'; |
21 | |
689c5a5d |
22 | plan tests => 3; |
23 | |
6bc86362 |
24 | my $m = Test::WWW::Mechanize::Catalyst->new; |
25 | $m->credentials( 'user', 'pass' ); |
26 | |
27 | $m->get_ok("/"); |
28 | $m->title_is("Root"); |
29 | |
30 | is( $m->status, 200 ); |