X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F96multi_create.t;h=23badf92ebe96f77b328c79d081894366ae35e41;hb=a28009914a3e447af53737d503b1953160d146c9;hp=79571d309da6b0d12cf3f8af60765b91566499ff;hpb=8d9a965b230ddf414241ff3235c31be28ba366b4;p=dbsrgits%2FDBIx-Class.git diff --git a/t/96multi_create.t b/t/96multi_create.t index 79571d3..23badf9 100644 --- a/t/96multi_create.t +++ b/t/96multi_create.t @@ -4,11 +4,10 @@ use warnings; use Test::More; use lib qw(t/lib); use DBICTest; -use DateTime; my $schema = DBICTest->init_schema(); -plan tests => 12; +plan tests => 17; my $cd2 = $schema->resultset('CD')->create({ artist => { name => 'Fred Bloggs' }, @@ -90,10 +89,11 @@ CREATE_RELATED1 :{ CREATE_RELATED2 :{ + my $artist = $schema->resultset('Artist')->first; - my $cd_result = $schema->resultset('Artist')->first->create_related('cds', { + my $cd_result = $artist->create_related('cds', { - title => 'TestOneCD1', + title => 'TestOneCD2', year => 2007, tracks => [ @@ -108,7 +108,7 @@ CREATE_RELATED2 :{ }); ok( $cd_result && ref $cd_result eq 'DBICTest::CD', "Got Good CD Class"); - ok( $cd_result->title eq "TestOneCD1", "Got Expected Title"); + ok( $cd_result->title eq "TestOneCD2", "Got Expected Title"); my $tracks = $cd_result->tracks; @@ -119,9 +119,3 @@ CREATE_RELATED2 :{ ok( $track && ref $track eq 'DBICTest::Track', 'Got Expected Track Class'); } } - -my $now = DateTime->now; - -ok( $schema->resultset('Event') - ->create( { starts_at => $now, created_on => $now } ), - 'object with inflated non-rels ok');