fREWFail: Remove IRC topic from DBIx::Class
[dbsrgits/DBIx-Class.git] / t / 70auto.t
1 use strict;
2 use warnings;  
3
4 use Test::More;
5 use lib qw(t/lib);
6 use DBICTest;
7
8 my $schema = DBICTest->init_schema();
9
10 plan tests => 2;
11
12 $schema->class("Artist")->load_components(qw/PK::Auto::SQLite/);
13   # Should just be PK::Auto but this ensures the compat shim works
14
15 # add an artist without primary key to test Auto
16 my $artist = $schema->resultset("Artist")->create( { name => 'Auto' } );
17 $artist->name( 'Auto Change' );
18 ok($artist->update, 'update on object created without PK ok');
19
20 my $copied = $artist->copy({ name => 'Don\'t tell the RIAA', artistid => undef });
21 is($copied->name, 'Don\'t tell the RIAA', "Copied with PKs ok.");
22