X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F18inserterror.t;h=005209ac4e3e046d079f7686579ab4c056dce517;hb=561f003c5b971a8156d1932d34dad8c05d730fb4;hp=043cec53f4aa9cf5f02cf0f7b3c0ea263aec8a2f;hpb=a4b2f17b810cea88ea194fb2fd3ed322f1129c6e;p=dbsrgits%2FDBIx-Class.git diff --git a/t/18inserterror.t b/t/18inserterror.t index 043cec5..005209a 100644 --- a/t/18inserterror.t +++ b/t/18inserterror.t @@ -7,19 +7,23 @@ BEGIN { eval "use DBD::SQLite"; plan $@ ? ( skip_all => 'needs DBD::SQLite for testing' ) - : ( tests => 3 ); + : ( tests => 4 ); } use lib qw(t/lib); use_ok( 'DBICTest' ); - use_ok( 'DBICTest::Schema' ); +my $schema = DBICTest->init_schema; { my $warnings; local $SIG{__WARN__} = sub { $warnings .= $_[0] }; - eval { DBICTest::CD->create({ title => 'vacation in antarctica' }) }; + eval { + $schema->resultset('CD') + ->create({ title => 'vacation in antarctica' }) + }; + like $@, qr/NULL/; # as opposed to some other error ok( $warnings !~ /uninitialized value/, "No warning from Storage" ); }