BEGIN {
use_ok 'MTITest';
- $ENV{DBIC_TRACE} = 1;
+ #$ENV{DBIC_TRACE} = 1;
}
dies_ok { MTITest->source('Foo')->view_definition }
#my $schema = MTITest->connect('dbi:SQLite::memory:');
my $schema = MTITest->connect( 'dbi:Pg:dbname=mti', 'postgres', '' );
-diag(DwarnS $schema);
-#diag("MTITest view definition: ", $schema->resultset('Bar')->result_source->view_definition);
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 } );
-
-#diag DwarnS $schema->source($_)->view_definition for qw(Foo Bar);
-#diag DwarnS $schema->source($_) for qw(Foo Bar);
use strict;
use warnings;
use lib 't/lib';
-use Test::More;
+use Test::More qw(no_plan);
use Test::Exception;
use Devel::Dwarn;
BEGIN {
use_ok 'Cafe';
- $ENV{DBIC_TRACE} = 1;
+ #$ENV{DBIC_TRACE} = 1;
}
my $schema = Cafe->connect( 'dbi:Pg:dbname=cafe', 'postgres', '' );
-#diag( DwarnS $schema);
-
-#diag(Dwarn $schema->source('Sumatra'));
-#diag(ref($schema->source('Sumatra')));
isa_ok($schema->source('Sumatra'), 'DBIx::Class::ResultSource::View', "My MTI class also");
-
-my $dir = "t/sql"; # tempdir(CLEANUP => 0);
-$schema->create_ddl_dir( ['PostgreSQL'], 0.1, $dir );
-
-
-
-
+#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 } );
my $drink = $schema->resultset('Sumatra')
->create( { sweetness => 4, aroma => 'earthy', flavor => 'great' } );
-my $cup = $schema->resultset('Coffee');
-
-diag(Dwarn $cup->result_source->columns);
-diag(Dwarn $schema->resultset('Sumatra')->result_source->columns);
-#my $drink = $schema->resultset('Sumatra')->new_result({sweetness => 6, aroma => 'chocolate'});
-ok($drink, "made new drink OK");
-$drink->insert;
-diag(Dwarn $drink->result_source->columns);
-
-diag(Dwarn mro::get_linear_isa $drink);
+#my $cup = $schema->resultset('Coffee');
-$drink->insert_or_update;
+##my $drink = $schema->resultset('Sumatra')->new_result({sweetness => 6, aroma => 'chocolate'});
+#ok($drink, "made new drink OK");
+#$drink->insert;
-done_testing;
+#$drink->insert_or_update;