summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2018-02-15 20:00:43 +0100
committerlain <lain@soykaf.club>2018-02-15 20:00:43 +0100
commit5454ec6a6ccedb2647cb765251e4cef3df2fcaf3 (patch)
tree2b92d2f7de89ee5fc1bc8c0ecfb63f673d6462f0 /test
parentef0300889db32be5e781fd2fa3a59e2d94f5eccd (diff)
downloadpleroma-5454ec6a6ccedb2647cb765251e4cef3df2fcaf3.tar.gz
pleroma-5454ec6a6ccedb2647cb765251e4cef3df2fcaf3.zip
ActivityPubController: Handle inbox data.
Diffstat (limited to 'test')
-rw-r--r--test/web/activity_pub/activity_pub_controller_test.exs11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/web/activity_pub/activity_pub_controller_test.exs b/test/web/activity_pub/activity_pub_controller_test.exs
index 21ed28cf2..957687c43 100644
--- a/test/web/activity_pub/activity_pub_controller_test.exs
+++ b/test/web/activity_pub/activity_pub_controller_test.exs
@@ -32,8 +32,15 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
end
describe "/users/:nickname/inbox" do
- test "it inserts an incoming activity into the database" do
- assert false
+ test "it inserts an incoming activity into the database", %{conn: conn} do
+ data = File.read!("test/fixtures/mastodon-post-activity.json") |> Poison.decode!
+
+ conn = conn
+ |> assign(:valid_signature, true)
+ |> put_req_header("content-type", "application/activity+json")
+ |> post("/users/doesntmatter/inbox", data)
+
+ assert "ok" == json_response(conn, 200)
end
end
end