Introduce GOVERNANCE document and empty RESOLUTIONS file.
[dbsrgits/DBIx-Class.git] / t / multi_create / has_many.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 my $link = $schema->resultset ('Link')->create ({
13   url => 'loldogs!',
14   bookmarks => [
15     { link => 'Mein Hund ist schwul'},
16     { link => 'Mein Hund ist schwul'},
17   ]
18 });
19 is ($link->bookmarks->count, 2, "Two identical default-insert has_many's created");
20
21
22 $link = $schema->resultset ('Link')->create ({
23   url => 'lolcats!',
24   bookmarks => [
25     {},
26     {},
27   ]
28 });
29 is ($link->bookmarks->count, 2, "Two identical default-insert has_many's created");
30
31 done_testing;