File: error.t

package info (click to toggle)
libdbix-class-perl 0.08123-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,520 kB
  • ctags: 1,695
  • sloc: perl: 19,821; sql: 353; makefile: 10
file content (20 lines) | stat: -rw-r--r-- 414 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;
use warnings;

use Test::More;
use Test::Warn;
use Test::Exception;

use lib qw(t/lib);
use_ok( 'DBICTest' );
use_ok( 'DBICTest::Schema' );

my $schema = DBICTest->init_schema;

warnings_are ( sub {
  throws_ok (sub {
    $schema->resultset('CD')->create({ title => 'vacation in antarctica' });
  }, qr/NULL/);  # as opposed to some other error
}, [], 'No warnings besides exception' );

done_testing;