From dcc161fbf8e330c44ba92686ee9f0841441105a7 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 22 Apr 2019 07:02:14 +0200 Subject: Skip database tests if no database is configured --- t/02-registration.t | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/t/02-registration.t b/t/02-registration.t index b8fb51e..efa0b8a 100644 --- a/t/02-registration.t +++ b/t/02-registration.t @@ -12,6 +12,10 @@ require "$FindBin::Bin/../index.pl"; my $t = Test::Mojo->new('Travelynx'); +if (not $t->app->config->{db}) { + plan(skip_all => 'No database configured'); +} + $t->app->pg->db->query('drop schema if exists travelynx_test_02 cascade'); $t->app->pg->db->query('create schema travelynx_test_02'); $t->app->pg->db->query('set search_path to travelynx_test_02'); -- cgit v1.2.3