205ba4f9be6559d9dd2acd591595dd0718e3281c
[dbsrgits/DBIx-Class.git] / t / 96multi_create.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 => 1;
11
12 my $artist = $schema->resultset('Artist')->create({ name => 'Fred 1'});
13
14 my $cd = $schema->resultset('CD')->create({ artist => $artist,
15                                             title => 'Some CD',
16                                             year => 1996
17                                           });
18
19 my $cd2 = $schema->resultset('CD')->create({ artist => 
20                                    { name => 'Fred Bloggs' },
21                                    title => 'Some CD',
22                                    year => 1996
23                                  });
24
25 is(ref $cd->artist, 'DBICTest::Artist', 'Created CD and Artist object');