From: Peter Rabbitson Date: Tue, 27 May 2014 16:58:12 +0000 (+0200) Subject: Excise live test left over after ac0c082542 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=680e2ac9adda36197b8b880c25fa344376f5914e;p=dbsrgits%2FDBIx-Class-Historic.git Excise live test left over after ac0c082542 No access to a live test system currently, and likely the test is incorrect anyway (no mention of significant parenthesis) --- diff --git a/t/751msaccess.t b/t/751msaccess.t index 8d8aa7e..bf4cdac 100644 --- a/t/751msaccess.t +++ b/t/751msaccess.t @@ -8,8 +8,6 @@ use Try::Tiny; use DBIx::Class::Optional::Dependencies (); use lib qw(t/lib); use DBICTest; -use DBIC::DebugObj (); -use DBIC::SqlMakerTest; my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MSACCESS_ODBC_${_}" } qw/DSN USER PASS/}; my ($dsn2, $user2, $pass2) = @ENV{map { "DBICTEST_MSACCESS_ADO_${_}" } qw/DSN USER PASS/}; @@ -144,12 +142,7 @@ EOF title => 'my track', }); - my ($sql, @bind); - my $joined_track = try { - local $schema->storage->{debug} = 1; - local $schema->storage->{debugobj} = DBIC::DebugObj->new(\$sql, \@bind); - $schema->resultset('Artist')->search({ artistid => $first_artistid, }, { @@ -162,27 +155,10 @@ EOF diag "Could not execute two-step left join: $_"; }; - s/^'//, s/'\z// for @bind; - - # test is duplicated in t/sqlmaker/msaccess.t, keep a duplicate here anyway, just to be safe - # -- ribasushi - is_same_sql_bind( - $sql, - \@bind, - 'SELECT [me].[artistid], [me].[name], [me].[rank], [me].[charfield], [tracks].[title] FROM ( ( [artist] [me] LEFT JOIN cd [cds] ON [cds].[artist] = [me].[artistid] ) LEFT JOIN [track] [tracks] ON [tracks].[cd] = [cds].[cdid] ) WHERE ( [artistid] = ? )', - [1], - 'correct SQL for two-step left join', - ); - is try { $joined_track->get_column('track_title') }, 'my track', 'two-step left join works'; - ($sql, @bind) = (); - $joined_artist = try { - local $schema->storage->{debug} = 1; - local $schema->storage->{debugobj} = DBIC::DebugObj->new(\$sql, \@bind); - $schema->resultset('Track')->search({ trackid => $track->trackid, }, { @@ -195,18 +171,6 @@ EOF diag "Could not execute two-step inner join: $_"; }; - s/^'//, s/'\z// for @bind; - - # test is duplicated in t/sqlmaker/msaccess.t, keep a duplicate here anyway, just to be safe - # -- ribasushi - is_same_sql_bind( - $sql, - \@bind, - 'SELECT [me].[trackid], [me].[cd], [me].[position], [me].[title], [me].[last_updated_on], [me].[last_updated_at], [artist].[name] FROM ( ( [track] [me] INNER JOIN cd [cd] ON [cd].[cdid] = [me].[cd] ) INNER JOIN [artist] [artist] ON [artist].[artistid] = [cd].[artist] ) WHERE ( [trackid] = ? )', - [$track->trackid], - 'correct SQL for two-step inner join', - ); - is try { $joined_artist->get_column('artist_name') }, 'foo', 'two-step inner join works';