X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F73oracle.t;h=40dcaac0141d0acceac9b12a2d9c989e875bce7c;hb=f73701540fd3636cae006be6631f037275be6b53;hp=fc324c5eb344cacae9fc9b65dff7b7cbbfa567ca;hpb=4ca1fd6fb90a85f5138d11f580394025aa20ea4a;p=dbsrgits%2FDBIx-Class.git diff --git a/t/73oracle.t b/t/73oracle.t index fc324c5..40dcaac 100644 --- a/t/73oracle.t +++ b/t/73oracle.t @@ -488,7 +488,7 @@ sub _run_tests { # create identically named tables/sequences in the other schema do_creates($dbh2, $q); - # grand select privileges to the 2nd user + # grant select privileges to the 2nd user $dbh->do("GRANT INSERT ON ${q}artist${q} TO " . uc $user2); $dbh->do("GRANT SELECT ON ${q}artist${q} TO " . uc $user2); $dbh->do("GRANT SELECT ON ${q}artist_pk_seq${q} TO " . uc $user2); @@ -551,6 +551,26 @@ sub _run_tests { do_clean ($dbh2); }} +# test driver determination issues that led to the diagnosis/fix in 37b5ab51 +# observed side-effect when count-is-first on a fresh env-based connect + { + local $ENV{DBI_DSN}; + ($ENV{DBI_DSN}, my @user_pass_args) = @{ $schema->storage->connect_info }; + my $s2 = DBICTest::Schema->connect( undef, @user_pass_args ); + ok (! $s2->storage->connected, 'Not connected' ); + is (ref $s2->storage, 'DBIx::Class::Storage::DBI', 'Undetermined driver' ); + + ok ( + $s2->resultset('Artist')->search({ 'me.name' => { like => '%' } }, { prefetch => 'cds' })->count, + 'Some artist count' + ); + ok ( + scalar $s2->resultset('CD')->search({}, { join => 'tracks' } )->all, + 'Some cds returned' + ); + $s2->storage->disconnect; + } + do_clean ($dbh); }