From: eal Date: Mon, 20 Nov 2017 17:16:43 +0000 (+0200) Subject: Make /api/friends/ids test deterministic. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=3d29fc5462e4b6bd9f0ee1f343ce971ef8606381;p=akkoma Make /api/friends/ids test deterministic. --- diff --git a/test/web/twitter_api/twitter_api_controller_test.exs b/test/web/twitter_api/twitter_api_controller_test.exs index 4b8fa85a5..d12ade132 100644 --- a/test/web/twitter_api/twitter_api_controller_test.exs +++ b/test/web/twitter_api/twitter_api_controller_test.exs @@ -548,8 +548,8 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest 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