823adb6764802629203ef4ce450b3b9174ae5478
[catagits/Test-WWW-Mechanize-Catalyst.git] / t / cookies.t
1 #!perl -T
2 use strict;
3 use warnings;
4 use lib 'lib';
5 use Test::More;
6
7 eval {
8     require Catalyst::Plugin::Session;
9     require Catalyst::Plugin::Session::State::Cookie;
10 };
11
12 if ($@) {
13     diag($@);
14     plan skip_all => "Need Catalyst::Plugin::Session to run this test";
15 } else {
16     plan tests => 3;
17 }
18 use lib 't/lib';
19 use Test::WWW::Mechanize::Catalyst 'CattySession';
20
21 my $m = Test::WWW::Mechanize::Catalyst->new;
22 $m->credentials( 'user', 'pass' );
23
24 $m->get_ok("/");
25 $m->title_is("Root");
26
27 is( $m->status, 200 );