Adding 'RETURNING *' to each body_part.
[dbsrgits/DBIx-Class-ResultSource-MultipleTableInheritance.git] / t / 03cafe.t
CommitLineData
c8e085ba 1use strict;
2use warnings;
3use lib 't/lib';
85c5d43c 4use Test::More qw(no_plan);
c8e085ba 5use Test::Exception;
6use Devel::Dwarn;
c8e085ba 7
8BEGIN {
9 use_ok 'Cafe';
85c5d43c 10 #$ENV{DBIC_TRACE} = 1;
c8e085ba 11}
12
8f839b1c 13my $schema = Cafe->connect( 'dbi:Pg:dbname=cafe', 'postgres', '' );
c8e085ba 14
8f839b1c 15isa_ok($schema->source('Sumatra'), 'DBIx::Class::ResultSource::View', "My MTI class also");
c8e085ba 16
85c5d43c 17#my $dir = "t/sql"; # tempdir(CLEANUP => 0);
18#$schema->create_ddl_dir( ['PostgreSQL'], 0.1, $dir );
8f839b1c 19
20$schema->deploy( { add_drop_table => 1, add_drop_view => 1 } );
21
22my $drink = $schema->resultset('Sumatra')
23 ->create( { sweetness => 4, aroma => 'earthy', flavor => 'great' } );
24
85c5d43c 25#my $cup = $schema->resultset('Coffee');
c8e085ba 26
85c5d43c 27##my $drink = $schema->resultset('Sumatra')->new_result({sweetness => 6, aroma => 'chocolate'});
28#ok($drink, "made new drink OK");
29#$drink->insert;
c8e085ba 30
85c5d43c 31#$drink->insert_or_update;