From bf30df99cb9a08870f7c6a25e0f9f3d2e03d5de7 Mon Sep 17 00:00:00 2001 From: Maxim Filippov Date: Sat, 2 Mar 2019 17:32:40 +0300 Subject: [PATCH] We do not guarantee the order of elements when we search --- test/user_test.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/user_test.exs b/test/user_test.exs index 4f9de4e31..188ab1a5c 100644 --- a/test/user_test.exs +++ b/test/user_test.exs @@ -901,8 +901,8 @@ defmodule Pleroma.UserTest do {:ok, follower} = User.follow(follower, u1) {:ok, u1} = User.follow(u1, friend) - assert [friend.id, follower.id, u2.id] == - Enum.map(User.search("doe", resolve: false, for_user: u1), & &1.id) + assert [friend.id, follower.id, u2.id] -- + Enum.map(User.search("doe", resolve: false, for_user: u1), & &1.id) == [] end test "finds a user whose name is nil" do -- 2.45.2