ConversationControllerTest: fix test, fix formatting
authorAlibek Omarov <a1ba.omarov@gmail.com>
Fri, 30 Oct 2020 12:10:19 +0000 (13:10 +0100)
committerGitea <gitea@fake.local>
Fri, 30 Oct 2020 12:59:53 +0000 (13:59 +0100)
test/pleroma/web/mastodon_api/controllers/conversation_controller_test.exs

index 8d07cff3f50914cfa96e993ef3ff3154e00693e7..291b6b2953e4601f92cd89f6ec3c5ebe5ed64b4b 100644 (file)
@@ -75,14 +75,17 @@ defmodule Pleroma.Web.MastodonAPI.ConversationControllerTest do
       res_conn = get(conn, "/api/v1/conversations")
 
       assert response = json_response_and_validate_schema(res_conn, 200)
+
       assert [
                %{
                  "accounts" => res_accounts,
                  "last_status" => res_last_status
                }
              ] = response
+
+      account_ids = Enum.map(res_accounts, & &1["id"])
       assert length(res_accounts) == 1
-      assert res_accounts[0]["id"] == user_one.id
+      assert user_one.id in account_ids
     end
 
     test "observes limit params", %{