Fix view ordering by requiring ddo declaration in result class
[dbsrgits/DBIx-Class-ResultSource-MultipleTableInheritance.git] / t / 03insert.t
index f25270c..2293d75 100644 (file)
@@ -4,6 +4,7 @@ use lib 't/lib';
 use Test::More qw(no_plan);
 use Test::Exception;
 use CafeInsertion;
+use Devel::Dwarn;
 
 BEGIN {
     $ENV{DBIC_TRACE} = 0;
@@ -19,6 +20,7 @@ EOM
 my $schema = CafeInsertion->connect( $dsn, $user, $pass );
 $schema->storage->ensure_connected;
 $schema->storage->_use_insert_returning(0);
+$schema->storage->dbh->{Warn} = 0;
 
 my $dir = "t/sql";    # tempdir(CLEANUP => 0);
 $schema->create_ddl_dir( ['PostgreSQL'], 0.1, $dir );
@@ -33,8 +35,13 @@ isa_ok(
 my ( $drink, $drink1 );
 
 lives_ok {
-    $drink = $schema->resultset('Sumatra')
-        ->create( { sweetness => 4, aroma => 'earthy', flavor => 'great' } );
+    $drink = $schema->resultset('Sumatra')->create(
+        {   sweetness => 4,
+            fat_free  => 1,
+            aroma     => 'earthy',
+            flavor    => 'great'
+        }
+    );
 }
 "I can call a create on a view sumatra";
 
@@ -44,11 +51,10 @@ lives_ok {
 "I can do it for the other view, too";
 
 my $sqlt_object = $schema->{sqlt};
-
 is_deeply(
     [ map { $_->name } $sqlt_object->get_views ],
     [   qw/
-            coffee 
+            coffee
             sumatra
             /
     ],