X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi%2FDeepAbstractSearch%2F01_search.t;h=7346138fa7196f5bfe75b3b0d06ac075d3e90d4c;hb=d9bd5195;hp=599cec1f0d92afa9ea30c57e211403d3b8303dba;hpb=68de943862f06cabd397d2e74d12cd9cdc999779;p=dbsrgits%2FDBIx-Class.git diff --git a/t/cdbi/DeepAbstractSearch/01_search.t b/t/cdbi/DeepAbstractSearch/01_search.t index 599cec1..7346138 100644 --- a/t/cdbi/DeepAbstractSearch/01_search.t +++ b/t/cdbi/DeepAbstractSearch/01_search.t @@ -1,16 +1,19 @@ use strict; use Test::More; +use lib 't/cdbi/testlib'; +use DBIC::Test::SQLite (); # this will issue the necessary SKIPs on missing reqs + BEGIN { - eval "use DBIx::Class::CDBICompat; require Class::DBI::Plugin::DeepAbstractSearch;"; - if ($@) { - plan (skip_all => "Class::DBI::Plugin::DeepAbstractSearch, Class::Trigger and DBIx::ContextualFetch required: $@"); - } - plan tests => 19; + eval { require Class::DBI::Plugin::DeepAbstractSearch } + or plan skip_all => 'Class::DBI::Plugin::DeepAbstractSearch required for this test'; } -my $DB = "t/var/cdbi_testdb"; -unlink $DB if -e $DB; +my $DB = DBICTest->_sqlite_dbname(sqlite_use_file => 1);; + +# not usre why this test needs an AutoCommit => 0 and a commit further +# down - EDONOTCARE +$ENV{DBIC_UNSAFE_AUTOCOMMIT_OK} = 1; my @DSN = ("dbi:SQLite:dbname=$DB", '', '', { AutoCommit => 0 }); @@ -289,5 +292,7 @@ package main; "CDs from Sony or Supraphon"; } +done_testing; + END { unlink $DB if -e $DB }