Permalink
Browse files

test db connection set through attribute (worked in Mojolicious >=3.0…

… only because of unintended side-effect)
  • Loading branch information...
tempire committed Aug 5, 2012
1 parent 0159fcf commit ac8fb54a8e76c74034162019e465c53a6e9b4550
Showing with 9 additions and 3 deletions.
  1. +3 −1 t/blogs.t
  2. +3 −1 t/home.t
  3. +3 −1 t/photos.t
  4. BIN test.db
View
@@ -5,7 +5,9 @@ use Schema;
use Test::Database;
my $schema = Test::Database->new->create(Schema => 'test.db');
my $t = Test::Mojo->new('MojoFull')->app(schema => $schema);
my $t = Test::Mojo->new('MojoFull');
$t->app->schema($schema);
# Blog not found
$t->get_ok('/blogs/bad_title')->status_is(302)
View
@@ -5,7 +5,9 @@ use Schema;
use Test::Database;
my $schema = Test::Database->new->create(Schema => 'test.db');
my $t = Test::Mojo->new('MojoFull')->app(schema => $schema);
my $t = Test::Mojo->new('MojoFull');
$t->app->schema($schema);
$t->get_ok('/')->status_is(200)->text_is(h1 => 'Purpose');
View
@@ -5,7 +5,9 @@ use Schema;
use Test::Database;
my $schema = Test::Database->new->create(Schema => 'test.db');
my $t = Test::Mojo->new('MojoFull')->app(schema => $schema);
my $t = Test::Mojo->new('MojoFull');
$t->app->schema($schema);
# Photo not found
$t->get_ok('/photos/bad_title')->status_is(302);
View
BIN test.db
Binary file not shown.

0 comments on commit ac8fb54

Please sign in to comment.