Introduce group basic federation, event new page and notifications

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-02-18 08:57:00 +01:00
parent 300ef8f245
commit 4144e9ffd0
416 changed files with 32220 additions and 16750 deletions

View File

@@ -9,6 +9,11 @@ defmodule Mobilizon.Service.Geospatial.PhotonTest do
alias Mobilizon.Config
alias Mobilizon.Service.Geospatial.Photon
@http_options [
follow_redirect: true,
ssl: [{:versions, [:"tlsv1.2"]}]
]
setup do
# Config.instance_user_agent/0 makes database calls so because of ownership connection
# we need to define it like this instead of a constant
@@ -22,7 +27,7 @@ defmodule Mobilizon.Service.Geospatial.PhotonTest do
describe "search address" do
test "produces a valid search address with options", %{httpoison_headers: httpoison_headers} do
with_mock HTTPoison,
get: fn _url, _headers ->
get: fn _url, _headers, _options ->
{:ok, %HTTPoison.Response{status_code: 200, body: "{\"features\": []"}}
end do
Photon.search("10 Rue Jangot",
@@ -33,7 +38,8 @@ defmodule Mobilizon.Service.Geospatial.PhotonTest do
assert_called(
HTTPoison.get(
"https://photon.komoot.de/api/?q=10%20Rue%20Jangot&lang=fr&limit=5",
httpoison_headers
httpoison_headers,
@http_options
)
)
end