diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-04-22 07:02:14 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-04-22 07:02:14 +0200 |
commit | dcc161fbf8e330c44ba92686ee9f0841441105a7 (patch) | |
tree | 74db742755d5ae3886fedcfcac92b66ee12085af | |
parent | 45212811ddbd968a6d1e0080fb13a05047caff02 (diff) |
Skip database tests if no database is configured
-rw-r--r-- | t/02-registration.t | 4 |
1 files changed, 4 insertions, 0 deletions
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'); |