Check for session method, not ISA C::P::Session for auth collaberation. evdb++
[catagits/Catalyst-Plugin-Authentication.git] / t / live_app_session.t
index b23a767..3f718cf 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
 use strict;
 use warnings;
 
@@ -8,7 +6,11 @@ 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;
+    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;
+    # There is something fishy going on here. When you run this from make test,
+    # there are 29 tests, when you run it from prove, there are 26 - WTF FIXME (t0m)
+    plan tests => 29;
 }
 
 use lib 't/lib';
@@ -18,4 +20,12 @@ 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("http://localhost/yak");
+ok(!$m->success, 'Not ok, user unable to be resotred == nasal demons');
+
+$m->get_ok("http://localhost/goat", "get ok");
 $m->get_ok("http://localhost/fluffy_bunny", "get ok");
+$m->get_ok("http://localhost/possum", "get ok");
+$m->get_ok("http://localhost/butterfly", "get ok");
+