Merge 'DBIx-Class-current' into 'bulk_create'
[dbsrgits/DBIx-Class.git] / t / 96multi_create.t
CommitLineData
33dd4e80 1use strict;
2use warnings;
3
4use Test::More;
5use lib qw(t/lib);
6use DBICTest;
7
8my $schema = DBICTest->init_schema();
9
10plan tests => 1;
11
12my $artist = $schema->resultset('Artist')->create({ name => 'Fred 1'});
13
14my $cd = $schema->resultset('CD')->create({ artist => $artist,
15 title => 'Some CD',
16 year => 1996
17 });
18
19my $cd2 = $schema->resultset('CD')->create({ artist =>
20 { name => 'Fred Bloggs' },
21 title => 'Some CD',
22 year => 1996
23 });
24
25is(ref $cd->artist, 'DBICTest::Artist', 'Created CD and Artist object');