X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fpleroma%2Fweb%2Fmastodon_api%2Fcontrollers%2Fconversation_controller_test.exs;h=c67e584dd73632762cadcaf5eaf0cf610e3e9e73;hb=1ab61953db36929517ce5a153cc18d4f65127a5a;hp=291b6b2953e4601f92cd89f6ec3c5ebe5ed64b4b;hpb=91f6c3243032d88a813e4cfed6bf3d0f1ae5924d;p=akkoma diff --git a/test/pleroma/web/mastodon_api/controllers/conversation_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/conversation_controller_test.exs index 291b6b295..c67e584dd 100644 --- a/test/pleroma/web/mastodon_api/controllers/conversation_controller_test.exs +++ b/test/pleroma/web/mastodon_api/controllers/conversation_controller_test.exs @@ -65,12 +65,11 @@ defmodule Pleroma.Web.MastodonAPI.ConversationControllerTest do assert Participation.unread_count(user_one) == 0 end - test "special behaviour when conversation have only one user", %{ + test "includes the user if the user is the only participant", %{ user: user_one, - user_two: user_two, conn: conn } do - {:ok, direct} = create_direct_message(user_one, []) + {:ok, _direct} = create_direct_message(user_one, []) res_conn = get(conn, "/api/v1/conversations") @@ -78,14 +77,11 @@ defmodule Pleroma.Web.MastodonAPI.ConversationControllerTest do assert [ %{ - "accounts" => res_accounts, - "last_status" => res_last_status + "accounts" => [account] } ] = response - account_ids = Enum.map(res_accounts, & &1["id"]) - assert length(res_accounts) == 1 - assert user_one.id in account_ids + assert user_one.id == account["id"] end test "observes limit params", %{