From: Robert Buels Date: Mon, 17 Aug 2009 21:51:40 +0000 (+0000) Subject: added more tests for multi-schema support in 72pg.t X-Git-Tag: v0.08109~2^2~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4617b7924272a8ddfea01a183576d6e41faac55d;p=dbsrgits%2FDBIx-Class.git added more tests for multi-schema support in 72pg.t --- diff --git a/t/72pg.t b/t/72pg.t index 0fc3f3d..b1b8f50 100644 --- a/t/72pg.t +++ b/t/72pg.t @@ -1,5 +1,5 @@ use strict; -use warnings; +use warnings; use Test::More; use Test::Exception; @@ -50,7 +50,7 @@ plan skip_all => 'Set $ENV{DBICTEST_PG_DSN}, _USER and _PASS to run this test '. unless ($dsn && $user); -plan tests => 42; +plan tests => 45; DBICTest::Schema->load_classes( 'Casecheck', 'ArrayTest' ); my $schema = DBICTest::Schema->connect($dsn, $user, $pass,); @@ -122,6 +122,17 @@ cmp_ok( $schema->resultset('Artist')->count, '==', 0, 'this should start with an is($unq_new && $unq_new->artistid, 1, "and got correct artistid"); + #test with anothertestschema + $schema->source('Artist')->name('anothertestschema.artist'); + my $another_new = $schema->resultset('Artist')->create({ name => 'ribasushi'}); + is( $another_new->artistid,1, 'got correct artistid for yetanotherschema'); + + #test with yetanothertestschema + $schema->source('Artist')->name('yetanothertestschema.artist'); + my $yetanother_new = $schema->resultset('Artist')->create({ name => 'ribasushi'}); + is( $yetanother_new->artistid,1, 'got correct artistid for yetanotherschema'); + is( $yetanother_new->artistid,1, 'got correct artistid for yetanotherschema'); + $schema->source("Artist")->name($artist_name_save); }