X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi%2F02-Film.t;h=0885f69e1486f646d4910e349dd7c6d55a38ca10;hb=7d5810cd5d389cee98fecaf5d27ac7ed2f27dce4;hp=2eb4f0593aa2d47469d8ecdc1a2fa6a0cdd91ede;hpb=68de943862f06cabd397d2e74d12cd9cdc999779;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/cdbi/02-Film.t b/t/cdbi/02-Film.t index 2eb4f05..0885f69 100644 --- a/t/cdbi/02-Film.t +++ b/t/cdbi/02-Film.t @@ -4,14 +4,6 @@ use Scalar::Util 'refaddr'; use namespace::clean; $| = 1; -BEGIN { - eval "use DBIx::Class::CDBICompat;"; - if ($@) { - plan (skip_all => 'Class::Trigger and DBIx::ContextualFetch required'); - } - plan tests => 98; -} - INIT { use lib 't/cdbi/testlib'; use Film; @@ -35,7 +27,7 @@ is(Film->__driver, "SQLite", "Driver set correctly"); eval { my $id = Film->title }; #like $@, qr/class method/, "Can't get title with no object"; ok $@, "Can't get title with no object"; -} +} eval { my $duh = Film->insert; }; like $@, qr/create needs a hashref/, "needs a hashref"; @@ -229,7 +221,7 @@ ok( # Test that a disconnect doesnt harm anything. { - # SQLite is loud on disconnect/reconnect. + # SQLite is loud on disconnect/reconnect. # This is solved in DBIC but not in ContextualFetch local $SIG{__WARN__} = sub { warn @_ unless $_[0] =~ @@ -400,7 +392,7 @@ SKIP: { my $btaste4 = Film->retrieve('Bad Taste'); isnt refaddr $btaste2, refaddr $btaste4, "Clearing cache and retrieving again gives new object"; - + $btaste=Film->insert({ Title => 'Bad Taste 2', Director => 'Peter Jackson', @@ -410,5 +402,7 @@ SKIP: { $btaste2 = Film->retrieve('Bad Taste 2'); is refaddr $btaste, refaddr $btaste2, "Creating and retrieving gives ref to same object"; - + } + +done_testing;