X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F19quotes_newstyle.t;h=3e7595aab975a94a1d4016418843e281d9200473;hb=98d4e1b45228b4052deb1672b47d1df19e7def28;hp=01a8c7778c7e9aca4559e0188674fafaaf7d8a5b;hpb=c2b7c5dcfa943d49d31ba94a6d9d6a282b714ffa;p=dbsrgits%2FDBIx-Class.git diff --git a/t/19quotes_newstyle.t b/t/19quotes_newstyle.t index 01a8c77..3e7595a 100644 --- a/t/19quotes_newstyle.t +++ b/t/19quotes_newstyle.t @@ -11,7 +11,7 @@ BEGIN { eval "use DBD::SQLite"; plan $@ ? ( skip_all => 'needs DBD::SQLite for testing' ) - : ( tests => 8 ); + : ( tests => 7 ); } use_ok('DBICTest'); @@ -42,17 +42,6 @@ $rs = $schema->resultset('CD')->search( eval { $rs->count }; is_same_sql_bind( $sql, \@bind, - "SELECT COUNT( * ) FROM `cd` `me` JOIN `artist` `artist` ON ( `artist`.`artistid` = `me`.`artist` ) WHERE ( `artist`.`name` = ? AND `me`.`year` = ? )", ["'Caterwauler McCrae'", "'2001'"], - 'got correct SQL for count query with quoting' -); - -# try with ->table(\'cd') should NOT be quoted -$rs = $schema->resultset('CDTableRef')->search( - { 'me.year' => 2001, 'artist.name' => 'Caterwauler McCrae' }, - { join => 'artist' }); -eval { $rs->count }; -is_same_sql_bind( - $sql, \@bind, "SELECT COUNT( * ) FROM cd `me` JOIN `artist` `artist` ON ( `artist`.`artistid` = `me`.`artist` ) WHERE ( `artist`.`name` = ? AND `me`.`year` = ? )", ["'Caterwauler McCrae'", "'2001'"], 'got correct SQL for count query with quoting' ); @@ -84,7 +73,7 @@ $rs = $schema->resultset('CD')->search( eval { $rs->count }; is_same_sql_bind( $sql, \@bind, - "SELECT COUNT( * ) FROM [cd] [me] JOIN [artist] [artist] ON ( [artist].[artistid] = [me].[artist] ) WHERE ( [artist].[name] = ? AND [me].[year] = ? )", ["'Caterwauler McCrae'", "'2001'"], + "SELECT COUNT( * ) FROM cd [me] JOIN [artist] [artist] ON ( [artist].[artistid] = [me].[artist] ) WHERE ( [artist].[name] = ? AND [me].[year] = ? )", ["'Caterwauler McCrae'", "'2001'"], 'got correct SQL for count query with bracket quoting' );