Commit | Line | Data |
a4b2f17b |
1 | use Class::C3; |
2 | use strict; |
3 | use Test::More; |
4 | use warnings; |
5 | |
6 | BEGIN { |
7 | eval "use DBD::SQLite"; |
8 | plan $@ |
9 | ? ( skip_all => 'needs DBD::SQLite for testing' ) |
e60dc79f |
10 | : ( tests => 4 ); |
a4b2f17b |
11 | } |
12 | |
13 | use lib qw(t/lib); |
14 | |
15 | use_ok( 'DBICTest' ); |
a4b2f17b |
16 | use_ok( 'DBICTest::Schema' ); |
e60dc79f |
17 | my $schema = DBICTest->init_schema; |
a4b2f17b |
18 | |
19 | { |
20 | my $warnings; |
21 | local $SIG{__WARN__} = sub { $warnings .= $_[0] }; |
e60dc79f |
22 | eval { |
23 | $schema->resultset('CD') |
24 | ->create({ title => 'vacation in antarctica' }) |
25 | }; |
26 | like $@, qr/NULL/; # as opposed to some other error |
a4b2f17b |
27 | ok( $warnings !~ /uninitialized value/, "No warning from Storage" ); |
28 | } |
29 | |