Make /api/friends/ids test deterministic.

This commit is contained in:
eal 2017-11-20 19:16:43 +02:00
parent 747a68a075
commit 3d29fc5462

View file

@ -548,8 +548,8 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
|> assign(:user, user) |> assign(:user, user)
|> get("/api/friends/ids") |> get("/api/friends/ids")
expected = Poison.encode!([followed_one.id, followed_two.id]) expected = [followed_one.id, followed_two.id]
assert json_response(conn, 200) == expected assert MapSet.equal?(MapSet.new(Poison.decode!(json_response(conn, 200))), MapSet.new(expected))
end end
end end