Fix specs.

This commit is contained in:
lain 2018-02-25 16:40:37 +01:00
parent dfaddeb765
commit 8e7f63afde
2 changed files with 5 additions and 1 deletions

View file

@ -450,4 +450,5 @@ defmodule Pleroma.User do
end end
def ap_enabled?(%User{info: info}), do: info["ap_enabled"] def ap_enabled?(%User{info: info}), do: info["ap_enabled"]
def ap_enabled?(_), do: false
end end

View file

@ -3,6 +3,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
import Pleroma.Factory import Pleroma.Factory
alias Pleroma.Web.ActivityPub.{UserView, ObjectView} alias Pleroma.Web.ActivityPub.{UserView, ObjectView}
alias Pleroma.{Repo, User} alias Pleroma.{Repo, User}
alias Pleroma.Activity
describe "/users/:nickname" do describe "/users/:nickname" do
test "it returns a json representation of the user", %{conn: conn} do test "it returns a json representation of the user", %{conn: conn} do
@ -38,9 +39,11 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
conn = conn conn = conn
|> assign(:valid_signature, true) |> assign(:valid_signature, true)
|> put_req_header("content-type", "application/activity+json") |> put_req_header("content-type", "application/activity+json")
|> post("/users/doesntmatter/inbox", data) |> post("/inbox", data)
assert "ok" == json_response(conn, 200) assert "ok" == json_response(conn, 200)
:timer.sleep(500)
assert Activity.get_by_ap_id(data["id"])
end end
end end
end end