X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi%2F06-hasa.t;h=255383be63b6a48a0794aac6d9208ba7363c4bfc;hb=fcf32d045;hp=8cc830159dc0b18d6f41f79bc8392e8fcd880ce3;hpb=68de943862f06cabd397d2e74d12cd9cdc999779;p=dbsrgits%2FDBIx-Class.git diff --git a/t/cdbi/06-hasa.t b/t/cdbi/06-hasa.t index 8cc8301..255383b 100644 --- a/t/cdbi/06-hasa.t +++ b/t/cdbi/06-hasa.t @@ -1,14 +1,7 @@ use strict; +use warnings; use Test::More; -BEGIN { - eval "use DBIx::Class::CDBICompat;"; - if ($@) { - plan (skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@"); - } - plan tests => 24; -} - @YA::Film::ISA = 'Film'; #local $SIG{__WARN__} = sub { }; @@ -159,10 +152,11 @@ my $bar = Bar->create({ id => 2, fav => 6 }); isa_ok($bar->fav, "Foo"); isa_ok($foo->fav, "Film"); -{ +{ my $foo; Foo->add_trigger(after_create => sub { $foo = shift->fav }); my $gwh = Foo->create({ id => 93, fav => 'Good Will Hunting' }); isa_ok $foo, "Film", "Object in after_create trigger"; } +done_testing;