Introduce GOVERNANCE document and empty RESOLUTIONS file.
[dbsrgits/DBIx-Class.git] / t / multi_create / cd_single.t
1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
3 use strict;
4 use warnings;
5
6 use Test::More;
7
8 use DBICTest;
9
10 my $schema = DBICTest->init_schema();
11
12 eval {
13   my $cd = $schema->resultset('CD')->first;
14   my $track = $schema->resultset('Track')->new_result({
15     cd => $cd,
16     title => 'Multicreate rocks',
17     cd_single => {
18       artist => $cd->artist,
19       year => 2008,
20       title => 'Disemboweling MultiCreate',
21     },
22   });
23
24   isa_ok ($track, 'DBICTest::Track', 'Main Track object created');
25
26   $track->insert;
27
28   ok(1, 'created track');
29
30   is($track->title, 'Multicreate rocks', 'Correct Track title');
31
32   my $single = $track->cd_single;
33
34   ok($single->cdid, 'Got cdid');
35 };
36
37 done_testing;