diff options
author | Dave Arter <davea@mysociety.org> | 2017-12-05 13:35:04 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2017-12-05 14:03:22 +0000 |
commit | 83c2d924404740ff8ab5e7200a470fc28325ff6a (patch) | |
tree | bb868d7ab33047fd324c852790901f4e2efd1358 /t/Mock | |
parent | 09623fcd4dffe2c29b32d09958432e774c06e8b6 (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.pm | 4 |
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 ] ]; }, } |