Commit | Line | Data |
c0329273 |
1 | BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } |
2 | |
49377893 |
3 | use strict; |
4 | use warnings; |
5 | |
6 | use Test::More; |
c0329273 |
7 | |
49377893 |
8 | use DBICTest; |
9 | |
49377893 |
10 | my $schema = DBICTest->init_schema(); |
11 | |
908aa1bb |
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 | ] |
49377893 |
18 | }); |
908aa1bb |
19 | is ($link->bookmarks->count, 2, "Two identical default-insert has_many's created"); |
49377893 |
20 | |
21 | |
908aa1bb |
22 | $link = $schema->resultset ('Link')->create ({ |
49377893 |
23 | url => 'lolcats!', |
24 | bookmarks => [ |
25 | {}, |
26 | {}, |
27 | ] |
28 | }); |
29 | is ($link->bookmarks->count, 2, "Two identical default-insert has_many's created"); |
908aa1bb |
30 | |
31 | done_testing; |