Commit | Line | Data |
c8e085ba |
1 | use strict; |
2 | use warnings; |
3 | use lib 't/lib'; |
85c5d43c |
4 | use Test::More qw(no_plan); |
c8e085ba |
5 | use Test::Exception; |
6 | use Devel::Dwarn; |
c8e085ba |
7 | |
8 | BEGIN { |
9 | use_ok 'Cafe'; |
85c5d43c |
10 | #$ENV{DBIC_TRACE} = 1; |
c8e085ba |
11 | } |
12 | |
8f839b1c |
13 | my $schema = Cafe->connect( 'dbi:Pg:dbname=cafe', 'postgres', '' ); |
c8e085ba |
14 | |
8f839b1c |
15 | isa_ok($schema->source('Sumatra'), 'DBIx::Class::ResultSource::View', "My MTI class also"); |
c8e085ba |
16 | |
85c5d43c |
17 | #my $dir = "t/sql"; # tempdir(CLEANUP => 0); |
18 | #$schema->create_ddl_dir( ['PostgreSQL'], 0.1, $dir ); |
8f839b1c |
19 | |
20 | $schema->deploy( { add_drop_table => 1, add_drop_view => 1 } ); |
21 | |
22 | my $drink = $schema->resultset('Sumatra') |
23 | ->create( { sweetness => 4, aroma => 'earthy', flavor => 'great' } ); |
24 | |
85c5d43c |
25 | #my $cup = $schema->resultset('Coffee'); |
c8e085ba |
26 | |
85c5d43c |
27 | ##my $drink = $schema->resultset('Sumatra')->new_result({sweetness => 6, aroma => 'chocolate'}); |
28 | #ok($drink, "made new drink OK"); |
29 | #$drink->insert; |
c8e085ba |
30 | |
85c5d43c |
31 | #$drink->insert_or_update; |