Skip to content

Commit

Permalink
added more tests for multi-schema support in 72pg.t
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed Aug 17, 2009
1 parent 7c0176a commit 4617b79
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions t/72pg.t
@@ -1,5 +1,5 @@
use strict;
use warnings;
use warnings;

use Test::More;
use Test::Exception;
Expand Down Expand Up @@ -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,);
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 4617b79

Please sign in to comment.