Commit | Line | Data |
49377893 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use Test::More; |
49377893 |
5 | use lib qw(t/lib); |
6 | use DBICTest; |
7 | |
49377893 |
8 | my $schema = DBICTest->init_schema(); |
9 | |
908aa1bb |
10 | my $link = $schema->resultset ('Link')->create ({ |
11 | url => 'loldogs!', |
12 | bookmarks => [ |
13 | { link => 'Mein Hund ist schwul'}, |
14 | { link => 'Mein Hund ist schwul'}, |
15 | ] |
49377893 |
16 | }); |
908aa1bb |
17 | is ($link->bookmarks->count, 2, "Two identical default-insert has_many's created"); |
49377893 |
18 | |
19 | |
908aa1bb |
20 | $link = $schema->resultset ('Link')->create ({ |
49377893 |
21 | url => 'lolcats!', |
22 | bookmarks => [ |
23 | {}, |
24 | {}, |
25 | ] |
26 | }); |
27 | is ($link->bookmarks->count, 2, "Two identical default-insert has_many's created"); |
908aa1bb |
28 | |
29 | done_testing; |