diff options
author | lain <lain@soykaf.club> | 2020-04-15 14:41:43 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-04-15 14:41:43 +0200 |
commit | 44bfb491eae00d541e6d11c8b52b5de5bc0bd34e (patch) | |
tree | 0fae87b11ceb4696075927c7f77228e59bb6926c /test/web/pleroma_api/controllers/pleroma_api_controller_test.exs | |
parent | 64c78581fe397b6d9356c52cf3f43becd2ff3b4e (diff) | |
parent | ad8630b95a691d01ec49344fd1a7578860728d63 (diff) | |
download | pleroma-44bfb491eae00d541e6d11c8b52b5de5bc0bd34e.tar.gz pleroma-44bfb491eae00d541e6d11c8b52b5de5bc0bd34e.zip |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
Diffstat (limited to 'test/web/pleroma_api/controllers/pleroma_api_controller_test.exs')
-rw-r--r-- | test/web/pleroma_api/controllers/pleroma_api_controller_test.exs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/web/pleroma_api/controllers/pleroma_api_controller_test.exs b/test/web/pleroma_api/controllers/pleroma_api_controller_test.exs index 32250f06f..8bf7eb3be 100644 --- a/test/web/pleroma_api/controllers/pleroma_api_controller_test.exs +++ b/test/web/pleroma_api/controllers/pleroma_api_controller_test.exs @@ -169,6 +169,23 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIControllerTest do id_one = activity.id id_two = activity_two.id assert [%{"id" => ^id_one}, %{"id" => ^id_two}] = result + + {:ok, %{id: id_three}} = + CommonAPI.post(other_user, %{ + "status" => "Bye!", + "in_reply_to_status_id" => activity.id, + "in_reply_to_conversation_id" => participation.id + }) + + assert [%{"id" => ^id_two}, %{"id" => ^id_three}] = + conn + |> get("/api/v1/pleroma/conversations/#{participation.id}/statuses?limit=2") + |> json_response(:ok) + + assert [%{"id" => ^id_three}] = + conn + |> get("/api/v1/pleroma/conversations/#{participation.id}/statuses?min_id=#{id_two}") + |> json_response(:ok) end test "PATCH /api/v1/pleroma/conversations/:id" do |