X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F46where_attribute.t;h=f798ace4e07f002c36d691d1db81c642d48044a1;hb=c704015d816990e1b2f41200ffb13a7f0dce6363;hp=a54adb6417b2745c8c5ea873a84eec31aead0142;hpb=5af542651c8fc99b9592f4effea6ea6b92b0afb2;p=dbsrgits%2FDBIx-Class.git diff --git a/t/46where_attribute.t b/t/46where_attribute.t index a54adb6..f798ace 100644 --- a/t/46where_attribute.t +++ b/t/46where_attribute.t @@ -6,12 +6,13 @@ use lib qw(t/lib); use DBICTest; my $schema = DBICTest->init_schema(); -plan tests => 19; - # select from a class with resultset_attributes my $resultset = $schema->resultset('BooksInLibrary'); is($resultset, 3, "select from a class with resultset_attributes okay"); +$resultset = $resultset->search({}, { where => undef }); +is($resultset, 3, "where condition not obliterated"); + # now test out selects through a resultset my $owner = $schema->resultset('Owners')->find({name => "Newton"}); my $programming_perl = $owner->books->find_or_create({ title => "Programming Perl" }); @@ -82,3 +83,5 @@ if ($@) { print $@ } ok( !$@, 'many_to_many set_$rel(\@objects) did not throw'); is($pointy_objects->count, $pointy_count, 'many_to_many set_$rel($hash) count correct'); is($round_objects->count, $round_count, 'many_to_many set_$rel($hash) other rel count correct'); + +done_testing;