X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi%2FDeepAbstractSearch%2F01_search.t;h=10f5f994e515500ba9d2c6abd8a6254f93e085c1;hb=8d6b1478d8fa6f7c76e313ee72a72d5eb4c24d03;hp=3db333eafa75b1f1c3372035375fb0444e36abe1;hpb=50891152d0b24649bfd67bdba97feec86b11c064;p=dbsrgits%2FDBIx-Class.git diff --git a/t/cdbi/DeepAbstractSearch/01_search.t b/t/cdbi/DeepAbstractSearch/01_search.t old mode 100755 new mode 100644 index 3db333e..10f5f99 --- a/t/cdbi/DeepAbstractSearch/01_search.t +++ b/t/cdbi/DeepAbstractSearch/01_search.t @@ -1,24 +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;"; - if ($@) { - plan (skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@"); - next; - } - - plan skip_all => 'needs DBD::SQLite for testing' - unless eval { require DBD::SQLite }; - - plan skip_all => 'needs Class::DBI::Plugin::DeepAbstractSearch' - unless eval { require Class::DBI::Plugin::DeepAbstractSearch }; - - 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 }); @@ -297,5 +292,4 @@ package main; "CDs from Sony or Supraphon"; } -END { unlink $DB if -e $DB } - +done_testing;