4 use Test::More qw(no_plan);
13 my $schema = Cafe->connect( 'dbi:Pg:dbname=test', 'postgres', '' );
14 $schema->storage->dbh->{Warn} = 0;
15 $schema->storage->ensure_connected;
16 $schema->storage->_use_insert_returning(0);
18 my $dir = "t/sql"; # tempdir(CLEANUP => 0);
19 $schema->create_ddl_dir( ['PostgreSQL'], 0.1, $dir );
20 $schema->deploy( { add_drop_table => 1, add_drop_view => 1 } );
23 $schema->source('Sumatra'),
24 'DBIx::Class::ResultSource::View',
28 my ( $drink, $drink1 );
31 $drink = $schema->resultset('Sumatra')
32 ->create( { sweetness => 4, aroma => 'earthy', flavor => 'great' } );
34 "I can call a create on a view sumatra";
37 $drink1 = $schema->resultset('Coffee')->create( { flavor => 'aaight', } );
39 "I can do it for the other view, too";