-use strict;
-use Test::More;
+use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
+use strict;
+use warnings;
-BEGIN {
- eval "use DBIx::Class::CDBICompat;";
- plan skip_all => 'Class::Trigger and DBIx::ContextualFetch required' if $@;
- plan tests => 31;
-}
-
+use Test::More;
use lib 't/cdbi/testlib';
use Film;
like $@, qr/class/, "add_to_actors must be object method";
eval { my $pj = $btaste->add_to_actors(%pj_data) };
-like $@, qr/needs/, "add_to_actors takes hash";
+like $@, qr/Result object instantiation requires a hashref as argument/, "add_to_actors takes hash";
ok(
my $pj = $btaste->add_to_actors(
is_deeply [sort map { $_->id } $other_thing->things], [1,2];
}
+
+done_testing;