add_relationship, relationship_info, relationships moved to ResultSource
[dbsrgits/DBIx-Class.git] / t / run / 10auto.tl
index 242cca3..1d6b569 100644 (file)
@@ -1,14 +1,17 @@
 sub run_tests {
 
-plan tests => 1;
+plan tests => 2;
 
-DBICTest::Artist->load_components(qw/PK::Auto::SQLite/);
+DBICTest->class("Artist")->load_components(qw/PK::Auto::SQLite/);
 
 # add an artist without primary key to test Auto
-my $artist = DBICTest::Artist->create( { name => 'Auto' } );
+my $artist = DBICTest->class("Artist")->create( { name => 'Auto' } );
 $artist->name( 'Auto Change' );
 ok($artist->update, 'update on object created without PK ok');
 
+my $copied = $artist->copy({ name => 'Don\'t tell the RIAA', artistid => undef });
+is($copied->name, 'Don\'t tell the RIAA', "Copied with PKs ok.");
+
 }
 
 1;