Remove extra 03 test file
[dbsrgits/DBIx-Class-ResultSource-MultipleTableInheritance.git] / t / 03insert.t
CommitLineData
2c296bdb 1use strict;
2use warnings;
3use lib 't/lib';
4use Test::More qw(no_plan);
5use Test::Exception;
6use Devel::Dwarn;
7
8BEGIN {
9 use_ok 'Cafe';
10 $ENV{DBIC_TRACE} = 1;
11}
12
13my $schema = Cafe->connect( 'dbi:Pg:dbname=cafe', 'postgres', '' );
14$schema->storage->ensure_connected;
15$schema->storage->_use_insert_returning(0);
16isa_ok(
17 $schema->source('Sumatra'),
18 'DBIx::Class::ResultSource::View',
19 "My MTI class also"
20);
21
22my ( $drink, $drink1 );
23
24lives_ok {
25 $drink = $schema->resultset('Sumatra')
26 ->create( { sweetness => 4, aroma => 'earthy', flavor => 'great' } );
27}
28"I can call a create on a view sumatra";
29
30lives_ok {
31 $drink1 = $schema->resultset('Coffee')->create( { flavor => 'aaight', } );
32}
33"I can do it for the other view, too";