Unbreak $rs->create() with empty hashref on Oracle
[dbsrgits/DBIx-Class.git] / t / 60core.t
index 62299c3..7930fce 100644 (file)
@@ -130,6 +130,13 @@ throws_ok {
 
 is($schema->resultset("Artist")->count, 4, 'count ok');
 
+# test find on an unresolvable condition
+is(
+  $schema->resultset('Artist')->find({ artistid => [ -and => 1, 2 ]}),
+  undef
+);
+
+
 # test find_or_new
 {
   my $existing_obj = $schema->resultset('Artist')->find_or_new({
@@ -569,9 +576,11 @@ lives_ok (sub { my $newlink = $newbook->link}, "stringify to false value doesn't
 {
     my $new_artist = $schema->resultset('Artist')->new({});
     isa_ok( $new_artist, 'DBIx::Class::Row', '$rs->new gives a row object' );
+    lives_ok { $new_artist->insert() } 'inserting without specifying any columns works';
+    $new_artist->discard_changes;
+    $new_artist->delete;
 }
 
-
 # make sure we got rid of the compat shims
 SKIP: {
     my $remove_version = 0.083;