debianize-mobilizon/test/support/mocks/geospatial_mock.ex

16 lines
397 B
Elixir
Raw Normal View History

defmodule Mobilizon.Service.Geospatial.Mock do
@moduledoc """
Mock for Geospatial Provider implementations
"""
alias Mobilizon.Service.Geospatial.Provider
alias Mobilizon.Addresses.Address
@behaviour Provider
@impl Provider
def geocode(_lon, _lat, _options \\ []), do: []
@impl Provider
def search(_q, _options \\ []), do: [%Address{description: "10 rue Jangot, Lyon"}]
end