X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F95sql_maker.t;h=d99d2013f1f61b2321b460b56c1bf8f95a1c411d;hb=b2b22cd666685403e0c926415efa92e7420e18c4;hp=48f66ac28c772e4f4f6c46925c67ffc7b646c176;hpb=1cbd30341b52723431f4ae937df004ba81428619;p=dbsrgits%2FDBIx-Class.git diff --git a/t/95sql_maker.t b/t/95sql_maker.t index 48f66ac..d99d201 100644 --- a/t/95sql_maker.t +++ b/t/95sql_maker.t @@ -2,16 +2,12 @@ use strict; use warnings; use Test::More; +use Test::Exception; use lib qw(t/lib); use DBIC::SqlMakerTest; -BEGIN { - eval "use DBD::SQLite"; - plan $@ - ? ( skip_all => 'needs DBD::SQLite for testing' ) - : ( tests => 3 ); -} +plan tests => 4; use_ok('DBICTest'); @@ -52,3 +48,9 @@ my $sql_maker = $schema->storage->sql_maker; 'sql_maker passes arrayrefs in update' ); } + +# Make sure the carp/croak override in SQLA works (via SQLAHacks) +my $file = __FILE__; +throws_ok (sub { + $schema->resultset ('Artist')->search ({}, { order_by => { -asc => 'stuff', -desc => 'staff' } } )->as_query; +}, qr/$file/, 'Exception correctly croak()ed');