From: Amiri Barksdale at Home Date: Thu, 23 Dec 2010 18:21:36 +0000 (-0800) Subject: Tidy tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ebcd7e950dc50fd9529d2d59acd1fb9fb72e3916;p=dbsrgits%2FDBIx-Class-ResultSource-MultipleTableInheritance.git Tidy tests --- diff --git a/lib/DBIx/Class/ResultSource/MultipleTableInheritance.pm b/lib/DBIx/Class/ResultSource/MultipleTableInheritance.pm index d07c74a..9dceab6 100644 --- a/lib/DBIx/Class/ResultSource/MultipleTableInheritance.pm +++ b/lib/DBIx/Class/ResultSource/MultipleTableInheritance.pm @@ -278,7 +278,6 @@ BEGIN { *function_body = sub { my ($name,$args,$body_parts) = @_; - $body_parts = [ map {$_ .= ' RETURNING *'} @$body_parts ]; my $arglist = join( ', ', map "_${\$_->{name}} ${\uc($_->{data_type})}", diff --git a/t/02view_def.t b/t/02view_def.t index a9a1345..7dffd5c 100644 --- a/t/02view_def.t +++ b/t/02view_def.t @@ -8,15 +8,16 @@ use Devel::Dwarn; BEGIN { use_ok 'MTITest'; - $ENV{DBIC_TRACE} = 1; + $ENV{DBIC_TRACE} = 0; } dies_ok { MTITest->source('Foo')->view_definition } "Can't generate view def without connected schema"; -my $schema = MTITest->connect( 'dbi:Pg:dbname=mti', 'postgres', '' ); +my $schema = MTITest->connect( 'dbi:Pg:dbname=test', 'postgres', '' ); my $dir = "t/sql"; # tempdir(CLEANUP => 0); +#$schema->storage->dbh->{Warn} = 0; $schema->create_ddl_dir( ['PostgreSQL'], 0.1, $dir ); -$schema->deploy( { add_drop_table => 1, add_drop_view => 1 } ); +$schema->deploy( { add_drop_table => 1, add_drop_view => 1} ); diff --git a/t/03insert.t b/t/03insert.t index e7271d0..275a753 100644 --- a/t/03insert.t +++ b/t/03insert.t @@ -7,12 +7,18 @@ use Devel::Dwarn; BEGIN { use_ok 'Cafe'; - $ENV{DBIC_TRACE} = 1; + $ENV{DBIC_TRACE} = 0; } -my $schema = Cafe->connect( 'dbi:Pg:dbname=cafe', 'postgres', '' ); +my $schema = Cafe->connect( 'dbi:Pg:dbname=test', 'postgres', '' ); +$schema->storage->dbh->{Warn} = 0; $schema->storage->ensure_connected; $schema->storage->_use_insert_returning(0); + +my $dir = "t/sql"; # tempdir(CLEANUP => 0); +$schema->create_ddl_dir( ['PostgreSQL'], 0.1, $dir ); +$schema->deploy( { add_drop_table => 1, add_drop_view => 1 } ); + isa_ok( $schema->source('Sumatra'), 'DBIx::Class::ResultSource::View',