Work around Addresses to bring them properly through GraphQL

Got caught with https://github.com/absinthe-graphql/absinthe/issues/601
at some point, that's why fields are renamed

Fix tests

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-03-22 15:51:23 +01:00
parent 53458b16a2
commit 0c8d2f7e00
25 changed files with 200 additions and 145 deletions

View File

@@ -42,12 +42,12 @@ defmodule Mobilizon.Service.Geospatial.GoogleMapsTest do
test "returns a valid address from search" do
use_cassette "geospatial/google_maps/search" do
assert %Address{
addressLocality: "Lyon",
locality: "Lyon",
description: "10 Rue Jangot, 69007 Lyon, France",
addressRegion: "Auvergne-Rhône-Alpes",
addressCountry: "France",
postalCode: "69007",
streetAddress: "10 Rue Jangot",
region: "Auvergne-Rhône-Alpes",
country: "France",
postal_code: "69007",
street: "10 Rue Jangot",
geom: %Geo.Point{
coordinates: {4.8424032, 45.75164940000001},
properties: %{},
@@ -60,12 +60,12 @@ defmodule Mobilizon.Service.Geospatial.GoogleMapsTest do
test "returns a valid address from reverse geocode" do
use_cassette "geospatial/google_maps/geocode" do
assert %Address{
addressLocality: "Lyon",
locality: "Lyon",
description: "10 Rue Jangot, 69007 Lyon, France",
addressRegion: "Auvergne-Rhône-Alpes",
addressCountry: "France",
postalCode: "69007",
streetAddress: "10 Rue Jangot",
region: "Auvergne-Rhône-Alpes",
country: "France",
postal_code: "69007",
street: "10 Rue Jangot",
geom: %Geo.Point{
coordinates: {4.8424967, 45.751725},
properties: %{},