X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F06order_by.t;h=0d340ae961baa7c2b0b2c39cd1830e5f67d8f396;hb=6aac9987ce7af38ba7ff8271a59aa68cdc9b192e;hp=1095862f3ffb73a2db91fa32aa8f52a6371c5957;hpb=4325df6ab1398d1edf742f5151be7ee47eb76e7e;p=scpubgit%2FQ-Branch.git diff --git a/t/06order_by.t b/t/06order_by.t index 1095862..0d340ae 100644 --- a/t/06order_by.t +++ b/t/06order_by.t @@ -58,6 +58,11 @@ my @cases = expects => '', expects_quoted => '', }, + { + given => [ {} ], + expects => '', + expects_quoted => '', + }, { given => [{-desc => [ qw/colA colB/ ] }], @@ -127,12 +132,6 @@ for my $case (@cases) { ); } -# meh - -done_testing; - -exit; - throws_ok ( sub { $sql->_order_by({-desc => 'colA', -asc => 'colB' }) }, qr/hash passed .+ must have exactly one key/, @@ -140,6 +139,12 @@ throws_ok ( ); throws_ok ( + sub { $sql->_order_by([ {-desc => 'colA', -asc => 'colB' } ]) }, + qr/hash passed .+ must have exactly one key/, + 'Undeterministic order exception', +); + +throws_ok ( sub { $sql->_order_by({-desc => [ qw/colA colB/ ], -asc => [ qw/colC colD/ ] }) }, qr/hash passed .+ must have exactly one key/, 'Undeterministic order exception',