aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2018-02-25 16:40:37 +0100
committerlain <lain@soykaf.club>2018-02-25 16:40:37 +0100
commit8e7f63afde9ea0fcc3d7955b850ce8564f4eb6e9 (patch)
tree9a33ffeff497c9aa3adca5028b7d9af131d0542a
parentdfaddeb765cdc7b5253663d7173aca52371e48bd (diff)
downloadpleroma-8e7f63afde9ea0fcc3d7955b850ce8564f4eb6e9.tar.gz
Fix specs.
-rw-r--r--lib/pleroma/user.ex1
-rw-r--r--test/web/activity_pub/activity_pub_controller_test.exs5
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex
index 2ae01c2cc..b16c1e342 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -450,4 +450,5 @@ defmodule Pleroma.User do
end
def ap_enabled?(%User{info: info}), do: info["ap_enabled"]
+ def ap_enabled?(_), do: false
end
diff --git a/test/web/activity_pub/activity_pub_controller_test.exs b/test/web/activity_pub/activity_pub_controller_test.exs
index 957687c43..c8082cd03 100644
--- a/test/web/activity_pub/activity_pub_controller_test.exs
+++ b/test/web/activity_pub/activity_pub_controller_test.exs
@@ -3,6 +3,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
import Pleroma.Factory
alias Pleroma.Web.ActivityPub.{UserView, ObjectView}
alias Pleroma.{Repo, User}
+ alias Pleroma.Activity
describe "/users/:nickname" 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
|> assign(:valid_signature, true)
|> put_req_header("content-type", "application/activity+json")
- |> post("/users/doesntmatter/inbox", data)
+ |> post("/inbox", data)
assert "ok" == json_response(conn, 200)
+ :timer.sleep(500)
+ assert Activity.get_by_ap_id(data["id"])
end
end
end