diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-10 20:00:05 +0400 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-10 20:00:05 +0400 |
commit | dd612f86ae85248062159d3d21f4a98cd3b4d65e (patch) | |
tree | 0df87465a15b09c4dd32d4526d6da385aeda8a26 /test | |
parent | 7f692343c80ddf353712490edfbcdb14866f5685 (diff) | |
parent | fc4f92c5de54f4a427fb0fccbd4e64a72344ac6f (diff) | |
download | pleroma-dd612f86ae85248062159d3d21f4a98cd3b4d65e.tar.gz |
Merge remote-tracking branch 'origin/develop' into global-status-expiration
Diffstat (limited to 'test')
-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 |