aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/00-check-we-are-staging.t17
-rw-r--r--t/app/controller/rss.t2
-rw-r--r--t/app/model/alert_type.t6
3 files changed, 8 insertions, 17 deletions
diff --git a/t/00-check-we-are-staging.t b/t/00-check-we-are-staging.t
index 4c9a255fe..072b5df76 100644
--- a/t/00-check-we-are-staging.t
+++ b/t/00-check-we-are-staging.t
@@ -5,21 +5,12 @@ use Test::More;
use FixMyStreet;
-# check that all the fields listed in general-example are also present in
-# general - helps prevent later test failures due to un-noticed additions to the
-# config file.
-
-# This code will bail_out to prevent the test suite proceeding to save time if
-# issues are found.
-
-# load the config file and store the contents in a readonly hash
-
-my $CONF_FILE = $ENV{FMS_OVERRIDE_CONFIG} || 'general';
-mySociety::Config::set_file( FixMyStreet->path_to("conf/${CONF_FILE}") );
+# check that we are running on staging
BAIL_OUT( "Test suite modifies databases so should not be run on live servers" )
- unless mySociety::Config::get('STAGING_SITE', undef);
+ unless FixMyStreet->config('STAGING_SITE');
-ok mySociety::Config::get('STAGING_SITE', undef), 'staging server';
+my $staging = FixMyStreet->config('STAGING_SITE');
+ok $staging, 'staging server';
done_testing();
diff --git a/t/app/controller/rss.t b/t/app/controller/rss.t
index db653c094..3e820cff3 100644
--- a/t/app/controller/rss.t
+++ b/t/app/controller/rss.t
@@ -181,7 +181,7 @@ my $report_to_county_council = FixMyStreet::App->model('DB::Problem')->find_or_c
subtest "check RSS feeds on cobrand have correct URLs for non-cobrand reports" => sub {
$mech->host('hart.fixmystreet.com');
- my $expected1 = mySociety::Config::get('BASE_URL') . '/report/' . $report_to_county_council->id;
+ my $expected1 = FixMyStreet->config('BASE_URL') . '/report/' . $report_to_county_council->id;
my $expected2;
FixMyStreet::override_config {
diff --git a/t/app/model/alert_type.t b/t/app/model/alert_type.t
index f67b5d1f7..0130f404e 100644
--- a/t/app/model/alert_type.t
+++ b/t/app/model/alert_type.t
@@ -442,8 +442,8 @@ subtest "check alerts from cobrand send main site url for alerts for different c
my $email = $mech->get_email;
my $body = $email->body;
- my $expected1 = mySociety::Config::get('BASE_URL') . '/report/' . $report_to_county_council->id;
- my $expected3 = mySociety::Config::get('BASE_URL') . '/report/' . $report_outside_district->id;
+ my $expected1 = FixMyStreet->config('BASE_URL') . '/report/' . $report_to_county_council->id;
+ my $expected3 = FixMyStreet->config('BASE_URL') . '/report/' . $report_outside_district->id;
my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker('hart')->new();
my $expected2 = $cobrand->base_url . '/report/' . $report_to_council->id;
@@ -479,7 +479,7 @@ subtest "check local alerts from cobrand send main site url for alerts for diffe
my $email = $mech->get_email;
my $body = $email->body;
- my $expected1 = mySociety::Config::get('BASE_URL') . '/report/' . $report_to_county_council->id;
+ my $expected1 = FixMyStreet->config('BASE_URL') . '/report/' . $report_to_county_council->id;
my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker('hart')->new();
my $expected2 = $cobrand->base_url . '/report/' . $report_to_council->id;