add TODO on constraint check
[dbsrgits/DBIx-Class.git] / t / 18inserterror.t
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' )
10         : ( tests => 4 );
11 }
12
13 use lib qw(t/lib);
14
15 use_ok( 'DBICTest' );
16 use_ok( 'DBICTest::Schema' );
17 my $schema = DBICTest->init_schema;
18
19 {
20        my $warnings;
21        local $SIG{__WARN__} = sub { $warnings .= $_[0] };
22        eval {
23          $schema->resultset('CD')
24                 ->create({ title => 'vacation in antarctica' })
25        };
26        like $@, qr/NULL/;  # as opposed to some other error
27        ok( $warnings !~ /uninitialized value/, "No warning from Storage" );
28 }
29