Commit | Line | Data |
---|---|---|
a4b2f17b | 1 | use strict; |
a4b2f17b | 2 | use warnings; |
3 | ||
56166f36 | 4 | use Test::More; |
5 | use Test::Warn; | |
6 | use Test::Exception; | |
a4b2f17b | 7 | |
8 | use lib qw(t/lib); | |
a4b2f17b | 9 | use_ok( 'DBICTest' ); |
a4b2f17b | 10 | use_ok( 'DBICTest::Schema' ); |
56166f36 | 11 | |
e60dc79f | 12 | my $schema = DBICTest->init_schema; |
a4b2f17b | 13 | |
56166f36 | 14 | warnings_are ( sub { |
15 | throws_ok (sub { | |
16 | $schema->resultset('CD')->create({ title => 'vacation in antarctica' }); | |
17 | }, qr/NULL/); # as opposed to some other error | |
18 | }, [], 'No warnings besides exception' ); | |
a4b2f17b | 19 | |
56166f36 | 20 | done_testing; |