summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2007-05-16 03:36:36 +0000
committerJason Woodward2007-05-16 03:36:36 +0000
commit2904e0c00cf8e606ffcb91f5c3e4a09340bfb9ee (patch)
tree8fca1e6b68d91904db2e69881c95c8d6157232df
parent9b03370ba51092b3a366b021a0dad95b9e0bb858 (diff)
downloadJaos-DBI-2904e0c00cf8e606ffcb91f5c3e4a09340bfb9ee.tar.gz
updated tests
-rw-r--r--t/instance.t3
-rw-r--r--t/search.t2
2 files changed, 3 insertions, 2 deletions
diff --git a/t/instance.t b/t/instance.t
index 075f58a..881aeb6 100644
--- a/t/instance.t
+++ b/t/instance.t
@@ -14,7 +14,7 @@ BEGIN
or plan skip_all =>
"DBD::CSV is needed for this test";
- plan tests => 9;
+ plan tests => 10;
unlink('foo_table') if ( -e 'foo_table' );
my $dbh = DBI->connect('DBI:CSV:f_dir=./') or die $DBI::errstr;
@@ -27,6 +27,7 @@ BEGIN
my $obj = Foo->find_or_create( id => 1, name => 'jason', password => 'pass', email => 'woodwardj@jaos.org' );
isa_ok($obj,'Foo');
isa_ok(Foo->retrieve(1),'Foo');
+ok(!Foo->retrieve(),'Empty retrieve() returns undef');
isa_ok(Foo->find_or_create( id => 2, name => 'jason', password => 'pass', email => 'woodwardj@jaos.org' ),'Foo');
ok($obj->id == 1,'testing generated method');
ok($obj->name eq 'jason','testing generated method');
diff --git a/t/search.t b/t/search.t
index 817c7f8..6bacfe9 100644
--- a/t/search.t
+++ b/t/search.t
@@ -14,7 +14,7 @@ BEGIN
or plan skip_all =>
"DBD::CSV is needed for this test";
- plan tests => 14;
+ plan tests => 15;
unlink('foo_table') if ( -e 'foo_table' );
my $dbh = DBI->connect('DBI:CSV:f_dir=./') or die $DBI::errstr;