Added copy test from Purge
[dbsrgits/DBIx-Class.git] / t / run / 10auto.tl
CommitLineData
0567538f 1sub run_tests {
2
2f6e5af9 3plan tests => 2;
0567538f 4
3712e4f4 5DBICTest->class("Artist")->load_components(qw/PK::Auto::SQLite/);
0567538f 6
7# add an artist without primary key to test Auto
3712e4f4 8my $artist = DBICTest->class("Artist")->create( { name => 'Auto' } );
0567538f 9$artist->name( 'Auto Change' );
10ok($artist->update, 'update on object created without PK ok');
11
2f6e5af9 12my $copied = $artist->copy({ name => 'Don\'t tell the RIAA', artistid => undef });
13is($copied->name, 'Don\'t tell the RIAA', "Copied with PKs ok.");
14
0567538f 15}
16
171;