Fix test warnings left in by 11343b34
[dbsrgits/DBIx-Class.git] / t / 60core.t
index ed7c225..dc62500 100644 (file)
@@ -173,7 +173,7 @@ is_deeply( \@cd, [qw/cdid artist title year genreid single_track/], 'column orde
 $cd = $schema->resultset("CD")->search({ title => 'Spoonful of bees' }, { columns => ['title'] })->next;
 is($cd->title, 'Spoonful of bees', 'subset of columns returned correctly');
 
-$cd = $schema->resultset("CD")->search(undef, { include_columns => [ { name => 'artist.name' } ], join => [ 'artist' ] })->find(1);
+$cd = $schema->resultset("CD")->search(undef, { '+columns' => [ { name => 'artist.name' } ], join => [ 'artist' ] })->find(1);
 
 is($cd->title, 'Spoonful of bees', 'Correct CD returned with include');
 is($cd->get_column('name'), 'Caterwauler McCrae', 'Additional column returned');
@@ -299,7 +299,9 @@ $or_rs->reset;
 $rel_rs->reset;
 
 my $tag = $schema->resultset('Tag')->search(
-               [ { 'me.tag' => 'Blue' } ], { cols=>[qw/tagid/] } )->next;
+  [ { 'me.tag' => 'Blue' } ],
+  { columns => 'tagid' }
+)->next;
 
 ok($tag->has_column_loaded('tagid'), 'Has tagid loaded');
 ok(!$tag->has_column_loaded('tag'), 'Has not tag loaded');
@@ -553,6 +555,14 @@ lives_ok (sub { my $newlink = $newbook->link}, "stringify to false value doesn't
   );
 }
 
+# test to make sure that calling ->new() on a resultset object gives
+# us a row object
+{
+    my $new_artist = $schema->resultset('Artist')->new({});
+    isa_ok( $new_artist, 'DBIx::Class::Row', '$rs->new gives a row object' );
+}
+
+
 # make sure we got rid of the compat shims
 SKIP: {
     my $remove_version = 0.083;