Make /api/friends/ids test deterministic.
This commit is contained in:
parent
747a68a075
commit
3d29fc5462
1 changed files with 2 additions and 2 deletions
|
@ -548,8 +548,8 @@ test "it returns a user's friends", %{conn: conn} 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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue