4 use Test::More qw(no_plan);
13 my $schema = NoSequence->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('Mesclun'),
24 'DBIx::Class::ResultSource::View',
28 my ( $bowl_of_salad, $bowl_of_salad1 );
31 $bowl_of_salad = $schema->resultset('Mesclun')
32 ->create( { acidity => 4, spiciness => '10', fresh => 0 } );
34 "I can call a create on a view mesclun";
37 $bowl_of_salad1 = $schema->resultset('Salad')->create( { fresh => 1 } );
39 "I can do it for the other view, too";