Made PK::Auto::* shells since the functionality is now elsewhere
[dbsrgits/DBIx-Class.git] / t / run / 10auto.tl
1 sub run_tests {
2 my $schema = shift;
3
4 plan tests => 2;
5
6 $schema->class("Artist")->load_components(qw/PK::Auto::SQLite/);
7   # Should just be PK::Auto but this ensures the compat shim works
8
9 # add an artist without primary key to test Auto
10 my $artist = $schema->resultset("Artist")->create( { name => 'Auto' } );
11 $artist->name( 'Auto Change' );
12 ok($artist->update, 'update on object created without PK ok');
13
14 my $copied = $artist->copy({ name => 'Don\'t tell the RIAA', artistid => undef });
15 is($copied->name, 'Don\'t tell the RIAA', "Copied with PKs ok.");
16
17 }
18
19 1;