aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-04-22 16:48:57 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-05-18 12:57:52 +0100
commit1a1bfff12415a7793fee22bcd4e5e39e10dbd4d3 (patch)
tree6313f583e4e278ad3fb2885b8bd0493bd429b23c /t
parent66d93ceaed9df6ff3e0e28a62e655ad769c99614 (diff)
Fallback if request to Gaze fails.
Fixes #1286.
Diffstat (limited to 't')
-rw-r--r--t/app/load_general_config.t5
-rw-r--r--t/fixmystreet.t6
2 files changed, 5 insertions, 6 deletions
diff --git a/t/app/load_general_config.t b/t/app/load_general_config.t
index 1051aac3f..16ca2fc54 100644
--- a/t/app/load_general_config.t
+++ b/t/app/load_general_config.t
@@ -5,7 +5,6 @@ use Test::More tests => 2;
use_ok 'FixMyStreet::App';
-# GAZE_URL chosen as it is unlikely to change
-is FixMyStreet::App->config->{GAZE_URL}, #
- 'http://gaze.mysociety.org/gaze', #
+is FixMyStreet::App->config->{GAZE_URL},
+ 'https://gaze.mysociety.org/gaze',
"check that known config param is loaded";
diff --git a/t/fixmystreet.t b/t/fixmystreet.t
index d7f00b047..a601c10d5 100644
--- a/t/fixmystreet.t
+++ b/t/fixmystreet.t
@@ -18,17 +18,17 @@ is "$path_to_path", $file_path, "got $file_path";
# check that the config gets loaded and is immutable
my $config = FixMyStreet->config;
isa_ok $config, 'HASH';
-is $config->{GAZE_URL}, 'http://gaze.mysociety.org/gaze',
+is $config->{GAZE_URL}, 'https://gaze.mysociety.org/gaze',
"got GAZE_URL correctly";
throws_ok(
sub { $config->{GAZE_URL} = 'some other value'; },
qr/Modification of a read-only value attempted/,
'attempt to change config caught'
);
-is $config->{GAZE_URL}, 'http://gaze.mysociety.org/gaze', "GAZE_URL unchanged";
+is $config->{GAZE_URL}, 'https://gaze.mysociety.org/gaze', "GAZE_URL unchanged";
# check that we can get the value by key as well
-is FixMyStreet->config('GAZE_URL'), 'http://gaze.mysociety.org/gaze',
+is FixMyStreet->config('GAZE_URL'), 'https://gaze.mysociety.org/gaze',
"GAZE_URL correct when got by key";
is FixMyStreet->config('BAD_KEY_DOES_NOT_EXIST'), undef, "config miss is undef";