Don't run the mech test unless you have new mech. FIXME - Why the hell is the test...
[catagits/Catalyst-Plugin-Authentication.git] / t / live_app_session.t
CommitLineData
10cdbe67 1use strict;
2use warnings;
3
4use Test::More;
5
6BEGIN {
00493b1e 7 eval { require Test::WWW::Mechanize::Catalyst; require Catalyst::Plugin::Session; require Catalyst::Plugin::Session::State::Cookie };
8 plan skip_all => "This test needs Test::WWW::Mechanize::Catalyst, Catalyst::Plugin::Session and Catalyst::Plugin::Session::State::Cookie installed" if $@;
26a7222c 9 plan skip_all => "This test needs Test::WWW::Mechanize::Catalyst >= 0.50, you have only $Test::WWW::Mechanize::Catalyst::VERSION"
10 unless $Test::WWW::Mechanize::Catalyst::VERSION >= 0.50;
11 plan tests => 26;
10cdbe67 12}
13
b42497b3 14use lib 't/lib';
15use Test::WWW::Mechanize::Catalyst qw/AuthSessionTestApp/; # for the cookie support
10cdbe67 16
17my $m = Test::WWW::Mechanize::Catalyst->new;
18
19$m->get_ok("http://localhost/moose", "get ok");
20$m->get_ok("http://localhost/elk", "get ok");
04ca89c6 21
22$m->get("http://localhost/yak");
23ok(!$m->success, 'Not ok, user unable to be resotred == nasal demons');
24
2fb8865d 25$m->get_ok("http://localhost/goat", "get ok");
10cdbe67 26$m->get_ok("http://localhost/fluffy_bunny", "get ok");
d0d5fbef 27$m->get_ok("http://localhost/possum", "get ok");
28$m->get_ok("http://localhost/butterfly", "get ok");
26a7222c 29