Add and fix tests

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-03-05 10:13:19 +01:00
parent 6de839dec2
commit 9a60704ed9
8 changed files with 55 additions and 17 deletions

View File

@@ -37,7 +37,7 @@ defmodule MobilizonWeb.ActivityPubController do
"""
@spec event(Plug.Conn.t(), map()) :: Plug.Conn.t()
def event(conn, %{"uuid" => uuid}) do
with {status, %Event{}} = event when status in [:ok, :commit] <-
with {status, %Event{} = event} when status in [:ok, :commit] <-
Events.get_cached_event_full_by_uuid(uuid),
true <- event.visibility in [:public, :unlisted] do
conn