ConversationViewTest: fix test
authorAlibek Omarov <a1ba.omarov@gmail.com>
Sun, 18 Oct 2020 16:01:17 +0000 (16:01 +0000)
committerGitea <gitea@fake.local>
Fri, 30 Oct 2020 11:58:51 +0000 (12:58 +0100)
test/pleroma/web/mastodon_api/views/conversation_view_test.exs

index 2e8203c9b1d6b75798d561c3faca2c429aaf1a9e..bd58fb2543af527bfff4f5f46d065761eb6fd3ec 100644 (file)
@@ -37,8 +37,10 @@ defmodule Pleroma.Web.MastodonAPI.ConversationViewTest do
     assert conversation.id == participation.id |> to_string()
     assert conversation.last_status.id == activity.id
 
-    assert [account] = conversation.accounts
-    assert account.id == other_user.id
+    account_ids = Enum.map(conversation.accounts, & &1["id"])
+    assert length(conversation.accounts) == 2
+    assert user.id in account_ids
+    assert other_user.id in account_ids
     assert conversation.last_status.pleroma.direct_conversation_id == participation.id
   end
 end