[Bast-commits] r5290 - DBIx-Class/0.08/trunk/t
rjbs at dev.catalyst.perl.org
rjbs at dev.catalyst.perl.org
Thu Jan 8 20:49:29 GMT 2009
Author: rjbs
Date: 2009-01-08 20:49:29 +0000 (Thu, 08 Jan 2009)
New Revision: 5290
Modified:
DBIx-Class/0.08/trunk/t/92storage_on_connect_do.t
Log:
failing test for callback on_connect_do getting storage obejct
Modified: DBIx-Class/0.08/trunk/t/92storage_on_connect_do.t
===================================================================
--- DBIx-Class/0.08/trunk/t/92storage_on_connect_do.t 2009-01-06 23:32:43 UTC (rev 5289)
+++ DBIx-Class/0.08/trunk/t/92storage_on_connect_do.t 2009-01-08 20:49:29 UTC (rev 5290)
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More tests => 9;
+use Test::More tests => 10;
use lib qw(t/lib);
use base 'DBICTest';
@@ -33,11 +33,11 @@
$schema->storage->disconnect();
-my($connected, $disconnected);
+my($connected, $disconnected, @cb_args);
ok $schema->connection(
DBICTest->_database,
{
- on_connect_do => sub { $connected = 1 },
+ on_connect_do => sub { $connected = 1; @cb_args = @_; },
on_disconnect_do => sub { $disconnected = 1 },
},
), 'second connection()';
@@ -47,6 +47,7 @@
$schema->storage->disconnect();
ok $disconnected, 'on_disconnect_do() called after disconnect()';
+isa_ok($cb_args[0], 'DBIx::Class::Storage', 'first arg to on_connect_do hook');
sub check_exists {
my $storage = shift;
More information about the Bast-commits
mailing list