test fixed

This commit is contained in:
Finn 2017-11-27 17:17:22 +00:00
parent 9a71c1b7f5
commit 65cadb5d24
1 changed files with 28 additions and 0 deletions

View File

@ -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;