[Bast-commits] r4335 - DBIx-Class/0.08/branches/replication_dedux/t
jnapiorkowski at dev.catalyst.perl.org
jnapiorkowski at dev.catalyst.perl.org
Mon May 5 21:42:53 BST 2008
Author: jnapiorkowski
Date: 2008-05-05 21:42:52 +0100 (Mon, 05 May 2008)
New Revision: 4335
Modified:
DBIx-Class/0.08/branches/replication_dedux/t/71mysql.t
Log:
updated mysql test to reflect the fetch without execute error
Modified: DBIx-Class/0.08/branches/replication_dedux/t/71mysql.t
===================================================================
--- DBIx-Class/0.08/branches/replication_dedux/t/71mysql.t 2008-05-05 20:32:58 UTC (rev 4334)
+++ DBIx-Class/0.08/branches/replication_dedux/t/71mysql.t 2008-05-05 20:42:52 UTC (rev 4335)
@@ -13,7 +13,7 @@
plan skip_all => 'Set $ENV{DBICTEST_MYSQL_DSN}, _USER and _PASS to run this test'
unless ($dsn && $user);
-plan tests => 5;
+plan tests => 10;
my $schema = DBICTest::Schema->connect($dsn, $user, $pass);
@@ -85,7 +85,34 @@
is_deeply($type_info, $test_type_info, 'columns_info_for - column data types');
}
+## Can we properly deal with the null search problem?
+
+use Data::Dump qw/dump/;
+
+NULLINSEARCH: {
+
+ ok my $artist1_rs = $schema->resultset('Artist')->search({artistid=>6666})
+ => 'Created an artist resultset of 6666';
+
+ is $artist1_rs->count, 0
+ => 'Got no returned rows';
+
+ ok my $artist2_rs = $schema->resultset('Artist')->search({artistid=>undef})
+ => 'Created an artist resultset of undef';
+
+ is $artist2_rs->count, 0
+ => 'got no rows';
+
+ my $artist = $artist2_rs->single;
+
+ is $artist => undef
+ => 'Nothing Found!';
+
+ warn dump $artist->get_columns if $artist;
+}
+
+
# clean up our mess
END {
- $dbh->do("DROP TABLE artist") if $dbh;
-}
+ #$dbh->do("DROP TABLE artist") if $dbh;
+}
\ No newline at end of file
More information about the Bast-commits
mailing list