X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi%2F06-hasa.t;h=255383be63b6a48a0794aac6d9208ba7363c4bfc;hb=4a233f3019d2baa4bf2abee0c873c74d5cdf3a11;hp=0fb3946891180eafb58ff6eed6f29b65fdc1c3ec;hpb=6a3bf2519832866d037740c5fb22341dad6f8bb3;p=dbsrgits%2FDBIx-Class.git diff --git a/t/cdbi/06-hasa.t b/t/cdbi/06-hasa.t index 0fb3946..255383b 100644 --- a/t/cdbi/06-hasa.t +++ b/t/cdbi/06-hasa.t @@ -1,16 +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: $@"); - next; - } - eval "use DBD::SQLite"; - plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 24); -} - @YA::Film::ISA = 'Film'; #local $SIG{__WARN__} = sub { }; @@ -161,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;