[Catalyst-commits] r9631 - in trunk/Catalyst-Plugin-Session-Store-DBIC/t: . lib/TestApp/Model

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Tue Mar 31 15:38:37 BST 2009


Author: rafl
Date: 2009-03-31 15:38:36 +0100 (Tue, 31 Mar 2009)
New Revision: 9631

Removed:
   trunk/Catalyst-Plugin-Session-Store-DBIC/t/04dbic.t
   trunk/Catalyst-Plugin-Session-Store-DBIC/t/lib/TestApp/Model/DBIC.pm
   trunk/Catalyst-Plugin-Session-Store-DBIC/t/lib/TestApp/Model/DBIC/
Log:
Remove tests relying on the long-deprecated DBIx::Class::DB.

Deleted: trunk/Catalyst-Plugin-Session-Store-DBIC/t/04dbic.t
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-DBIC/t/04dbic.t	2009-03-30 21:45:15 UTC (rev 9630)
+++ trunk/Catalyst-Plugin-Session-Store-DBIC/t/04dbic.t	2009-03-31 14:38:36 UTC (rev 9631)
@@ -1,82 +0,0 @@
-#!perl
-
-use strict;
-use warnings;
-use FindBin;
-use Test::More;
-use Test::Warn;
-
-use lib "$FindBin::Bin/lib";
-
-BEGIN {
-    eval { require DBD::SQLite }
-        or plan skip_all => "DBD::SQLite is required for this test";
-
-    eval { require Catalyst::Plugin::Session::State::Cookie }
-        or plan skip_all => "Catalyst::Plugin::Session::State::Cookie is required for this test";
-
-    eval { require Test::WWW::Mechanize::Catalyst }
-        or plan skip_all => "Test::WWW::Mechanize::Catalyst is required for this test";
-
-    plan tests => 14;
-
-    $ENV{TESTAPP_DB_FILE} = "$FindBin::Bin/session.db";
-
-    $ENV{TESTAPP_CONFIG} = {
-        name    => 'TestApp',
-        session => {
-            dbic_class    => 'DBIC::Session',
-            expires       => 3600,
-            id_field      => 'id',
-            data_field    => 'data',
-            expires_field => 'expires',
-        },
-    };
-
-    $ENV{TESTAPP_PLUGINS} = [qw/
-        Session
-        Session::State::Cookie
-        Session::Store::DBIC
-    /];
-}
-
-use SetupDB;
-use Test::WWW::Mechanize::Catalyst 'TestApp';
-
-my $mech = Test::WWW::Mechanize::Catalyst->new;
-
-my $key   = 'db';
-my $value = scalar localtime;
-
-# Setup session
-$mech->get_ok("http://localhost/session/setup?key=$key&value=$value", 'request to set session value');
-$mech->content_is('ok', 'set session value');
-
-# Setup flash
-$mech->get_ok("http://localhost/flash/setup?key=$key&value=$value", 'request to set flash value');
-$mech->content_is('ok', 'set flash value');
-
-# Check flash
-$mech->get_ok("http://localhost/flash/output?key=$key", 'request to get flash value');
-$mech->content_is($value, 'got flash value back');
-
-# Check session
-$mech->get_ok("http://localhost/session/output?key=$key", 'request to get session value');
-$mech->content_is($value, 'got session value back');
-
-# Exceed our session storage capactity
-$value = "blah" x 200;
-warning_like{
-    $mech->get_ok("http://localhost/session/setup?key=$key&value=$value", 'exceeding storage capacity');
-} qr/^This session requires \d+ bytes of storage, but your database column 'data' can only store 200 bytes. Storing this session may not be reliable; increase the size of your data field/, 'warning thrown as expected';
-
-# Delete session
-$mech->get_ok('http://localhost/session/delete', 'request to delete session');
-$mech->content_is('ok', 'deleted session');
-
-# Delete expired sessions
-$mech->get_ok('http://localhost/session/delete_expired', 'request to delete expired sessions');
-$mech->content_is('ok', 'deleted expired sessions');
-
-# Clean up
-unlink $ENV{TESTAPP_DB_FILE};

Deleted: trunk/Catalyst-Plugin-Session-Store-DBIC/t/lib/TestApp/Model/DBIC.pm
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-DBIC/t/lib/TestApp/Model/DBIC.pm	2009-03-30 21:45:15 UTC (rev 9630)
+++ trunk/Catalyst-Plugin-Session-Store-DBIC/t/lib/TestApp/Model/DBIC.pm	2009-03-31 14:38:36 UTC (rev 9631)
@@ -1,17 +0,0 @@
-package TestApp::Model::DBIC;
-
-eval { require DBIx::Class }; return 1 if $@;
- at ISA = qw/DBIx::Class/;
-
-use strict;
-use warnings;
-
-__PACKAGE__->load_components(qw/Core DB/);
-
-our $db_file = $ENV{TESTAPP_DB_FILE};
-
-__PACKAGE__->connection(
-    "dbi:SQLite:$db_file",
-);
-
-1;




More information about the Catalyst-commits mailing list