X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi%2F02-Film.t;h=b8159c4cc14d3cf70c626e4c027f13552f290fb0;hb=e5053694;hp=0885f69e1486f646d4910e349dd7c6d55a38ca10;hpb=d9bd51956470404b3960871d3413fa98f16961d2;p=dbsrgits%2FDBIx-Class.git diff --git a/t/cdbi/02-Film.t b/t/cdbi/02-Film.t index 0885f69..b8159c4 100644 --- a/t/cdbi/02-Film.t +++ b/t/cdbi/02-Film.t @@ -1,13 +1,16 @@ +BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } +use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat'; + use strict; +use warnings; + use Test::More; use Scalar::Util 'refaddr'; use namespace::clean; $| = 1; -INIT { - use lib 't/cdbi/testlib'; - use Film; -} +use lib 't/cdbi/testlib'; +use Film; ok(Film->can('db_Main'), 'set_db()'); is(Film->__driver, "SQLite", "Driver set correctly"); @@ -30,7 +33,7 @@ is(Film->__driver, "SQLite", "Driver set correctly"); } eval { my $duh = Film->insert; }; -like $@, qr/create needs a hashref/, "needs a hashref"; +like $@, qr/Result object instantiation requires a single hashref argument/, "needs a hashref"; ok +Film->create_test_film; @@ -369,9 +372,7 @@ if (0) { ok !$film, "It destroys itself"; } -SKIP: { - skip "Caching has been removed", 5 - if Film->isa("DBIx::Class::CDBICompat::NoObjectIndex"); +{ # my bad taste is your bad taste my $btaste = Film->retrieve('Bad Taste');