Start known issues changelog section - place it on top for clarity
[dbsrgits/DBIx-Class.git] / t / multi_create / has_many.t
CommitLineData
c0329273 1BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
49377893 3use strict;
4use warnings;
5
6use Test::More;
c0329273 7
49377893 8use DBICTest;
9
49377893 10my $schema = DBICTest->init_schema();
11
908aa1bb 12my $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 19is ($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});
29is ($link->bookmarks->count, 2, "Two identical default-insert has_many's created");
908aa1bb 30
31done_testing;