Make /api/friends/ids test deterministic.

This commit is contained in:
eal 2017-11-20 19:16:43 +02:00
parent 747a68a075
commit 3d29fc5462
1 changed files with 2 additions and 2 deletions

View File

@ -548,8 +548,8 @@ test "it returns a user's friends", %{conn: conn} do
|> assign(:user, user)
|> get("/api/friends/ids")
expected = Poison.encode!([followed_one.id, followed_two.id])
assert json_response(conn, 200) == expected
expected = [followed_one.id, followed_two.id]
assert MapSet.equal?(MapSet.new(Poison.decode!(json_response(conn, 200))), MapSet.new(expected))
end
end