X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fsqlmaker%2Forder_by_bindtransport.t;h=24da80ed9ec838ca693c69025daccfca329a8ada;hb=961d79dbe25ef8a92e867fcc84914b4bf568c11d;hp=095f72d994b579f7db529a76cf77f14fc4849b1b;hpb=0e773352a9c6c034dfb2526b8d68bf6ac1e2323b;p=dbsrgits%2FDBIx-Class.git diff --git a/t/sqlmaker/order_by_bindtransport.t b/t/sqlmaker/order_by_bindtransport.t index 095f72d..24da80e 100644 --- a/t/sqlmaker/order_by_bindtransport.t +++ b/t/sqlmaker/order_by_bindtransport.t @@ -5,16 +5,10 @@ use Test::More; use Test::Exception; use Data::Dumper::Concise; use lib qw(t/lib); -use DBICTest; -use DBIC::SqlMakerTest; - -my $schema = DBICTest->init_schema; - -my $rs = $schema->resultset('FourKeys'); +use DBICTest ':DiffSQL'; sub test_order { - - TODO: { + my $rs = shift; my $args = shift; local $TODO = "Not implemented" if $args->{todo}; @@ -30,9 +24,9 @@ sub test_order { } )->as_query, "( - SELECT me.foo, me.bar, me.hello, me.goodbye, me.sensors, me.read_count - FROM fourkeys me - WHERE ( foo = ? ) + SELECT me.foo, me.bar, me.hello, me.goodbye, me.sensors, me.read_count + FROM fourkeys me + WHERE ( foo = ? ) HAVING read_count > ? OR read_count < ? ORDER BY $args->{order_req} )", @@ -49,7 +43,6 @@ sub test_order { ], ) || diag Dumper $args->{order_by}; }; - } } my @tests = ( @@ -100,6 +93,7 @@ my @tests = ( }, ); -test_order($_) for @tests; +my $rs = DBICTest->init_schema->resultset('FourKeys'); +test_order($rs, $_) for @tests; done_testing;