X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F46where_attribute.t;h=ba1c7d09ebaf631099b7f25c3ca4cc173250619d;hb=4c90556806f286093d0806e858abdba329e6dfd3;hp=1c035911822a5dd4611d874a637cf8a41fb875ec;hpb=d2d82857c6643eee65dd3642f0109c064766c90a;p=dbsrgits%2FDBIx-Class.git diff --git a/t/46where_attribute.t b/t/46where_attribute.t index 1c03591..ba1c7d0 100644 --- a/t/46where_attribute.t +++ b/t/46where_attribute.t @@ -1,18 +1,20 @@ +BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } + use strict; use warnings; use Test::More; -use Data::Dumper; -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" }); @@ -83,3 +85,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;