aboutsummaryrefslogtreecommitdiffstats
path: root/t/Mock
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2017-12-05 13:35:04 +0000
committerDave Arter <davea@mysociety.org>2017-12-05 14:03:22 +0000
commit83c2d924404740ff8ab5e7200a470fc28325ff6a (patch)
treebb868d7ab33047fd324c852790901f4e2efd1358 /t/Mock
parent09623fcd4dffe2c29b32d09958432e774c06e8b6 (diff)
Ensure Mock::Nominatim JSON is encoded in en-gb locale
This was causing an error in "Test ajax decimal points" in fixamingata.t due to "importance" being encoded with a comma decimal separator.
Diffstat (limited to 't/Mock')
-rw-r--r--t/Mock/Nominatim.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/Mock/Nominatim.pm b/t/Mock/Nominatim.pm
index 6a61b423e..1f4e248d2 100644
--- a/t/Mock/Nominatim.pm
+++ b/t/Mock/Nominatim.pm
@@ -21,7 +21,9 @@ sub dispatch_request {
sub (GET + /search + ?q=) {
my ($self, $q) = @_;
my $response = $self->query($q);
- my $json = $self->json->encode($response);
+ my $json = mySociety::Locale::in_gb_locale {
+ $self->json->encode($response);
+ };
return [ 200, [ 'Content-Type' => 'application/json' ], [ $json ] ];
},
}