From 361e0e359cfcfaec4fb5ddc1c865e5e85470fdd7 Mon Sep 17 00:00:00 2001 From: Finn Date: Mon, 27 Nov 2017 17:17:22 +0000 Subject: [PATCH] test fixed --- t/api/v1/supplier/location.t | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/t/api/v1/supplier/location.t b/t/api/v1/supplier/location.t index 89b277a..032c716 100644 --- a/t/api/v1/supplier/location.t +++ b/t/api/v1/supplier/location.t @@ -59,4 +59,32 @@ $t->post_ok('/api/v1/supplier/location' => json => { longitude => -2.79611, }); + $t->post_ok('/api/v1/supplier/location/lis' => json => { + session_key => $session_key, + north_east => { + latitude => 54.077665, + longitude => -2.761860, + }, + south_west => { + latitude => 54.013361, + longitude => -2.857647, + }, + }) + ->status_is(200)->or($framework->dump_error) + ->json_is('/success', Mojo::JSON->true) + ->json_is('/locations', [ + { + name => 'Test Org 2', + latitude => 54.04679, + longitude => -2.7963, + street_name => 'Test Street', + town => 'Lancaster', + postcode => 'LA1 1AG', + }, + ]) + ->json_is('/self', { + latitude => 54.04725, + longitude => -2.79611, + }); + done_testing;