From: John Napiorkowski Date: Wed, 30 Apr 2008 23:15:28 +0000 (+0000) Subject: added test to check when nothing is found X-Git-Tag: v0.08240~402^2~63 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6f6fb437e70d4c090d92d9bdbd93157fd7903141;p=dbsrgits%2FDBIx-Class.git added test to check when nothing is found --- diff --git a/t/93storage_replication.t b/t/93storage_replication.t index b70e254..ac6a33d 100644 --- a/t/93storage_replication.t +++ b/t/93storage_replication.t @@ -8,7 +8,7 @@ BEGIN { eval "use Moose"; plan $@ ? ( skip_all => 'needs Moose for testing' ) - : ( tests => 33 ); + : ( tests => 34 ); } use_ok 'DBIx::Class::Storage::DBI::Replicated::Pool'; @@ -225,6 +225,11 @@ is $artist3->name, "Dead On Arrival" is $replicated->schema->storage->pool->connected_replicants => 1 => "One replicant reconnected to handle the job"; + +## What happens when we try to select something that doesn't exist? + +ok ! $replicated->schema->resultset('Artist')->find(666) + => 'Correctly failed to find something.'; ## Delete the old database files $replicated->cleanup;