From 5493e3ad9623036f11bb458ee8abdd5c4250a8ed Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Wed, 8 Jun 2011 18:40:40 +0100 Subject: skip tests if no entry in secret table rather than failing --- t/app/controller/admin.t | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 't/app/controller/admin.t') diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t index ea3e8a656..5b7a3e83a 100644 --- a/t/app/controller/admin.t +++ b/t/app/controller/admin.t @@ -6,6 +6,14 @@ use FixMyStreet::TestMech; my $mech = FixMyStreet::TestMech->new; +my $secret = FixMyStreet::App->model('DB::Secret')->search(); + +# don't explode if there's nothing in the secret table +if ( $secret == 0 ) { + diag "You need to put an entry in the secret table for the admin tests to run"; + plan skip_all => 'No entry in secret table'; +} + $mech->get_ok('/admin'); $mech->title_like(qr/Summary/); -- cgit v1.2.3