X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive_app_session.t;h=756605e974920004c68a63ffa79749742f78f535;hb=58269716161dd2509b47812a6054aad20493feba;hp=b23a767365a8bf0a62419e85f6b7d0ac057059c8;hpb=a3bf437a38fe00ccd875947ee09eb0e53ecc3396;p=catagits%2FCatalyst-Plugin-Authentication.git diff --git a/t/live_app_session.t b/t/live_app_session.t index b23a767..756605e 100644 --- a/t/live_app_session.t +++ b/t/live_app_session.t @@ -1,14 +1,13 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More; BEGIN { - eval { require Test::WWW::Mechanize::Catalyst; require Catalyst::Plugin::Session; require Catalyst::Plugin::Session::State::Cookie }; - plan skip_all => "This test needs Test::WWW::Mechanize::Catalyst, Catalyst::Plugin::Session and Catalyst::Plugin::Session::State::Cookie installed" if $@; - plan tests => 14; + eval { require Test::WWW::Mechanize::Catalyst; require Catalyst::Plugin::Session; require Catalyst::Plugin::Session::State::Cookie }; + plan skip_all => "This test needs Test::WWW::Mechanize::Catalyst, Catalyst::Plugin::Session and Catalyst::Plugin::Session::State::Cookie installed" if $@; + plan skip_all => "This test needs Test::WWW::Mechanize::Catalyst >= 0.50, you have only $Test::WWW::Mechanize::Catalyst::VERSION" + unless $Test::WWW::Mechanize::Catalyst::VERSION >= 0.50; } use lib 't/lib'; @@ -18,4 +17,13 @@ my $m = Test::WWW::Mechanize::Catalyst->new; $m->get_ok("http://localhost/moose", "get ok"); $m->get_ok("http://localhost/elk", "get ok"); -$m->get_ok("http://localhost/fluffy_bunny", "get ok"); + +$m->get("http://localhost/yak"); +ok(!$m->success, 'Not ok, user unable to be resotred == nasal demons'); + +foreach my $type (qw/ goat fluffy_bunny possum butterfly /) { + $m->get_ok("http://localhost/$type", "get $type ok"); +} + +done_testing; +