From edc3e5bc3014b1ca395038736dd8fd6b6aeed560 Mon Sep 17 00:00:00 2001 From: eal Date: Mon, 20 Nov 2017 07:52:02 +0200 Subject: Make users in tests follow themselves by default. Also fix the semantics of all tests to match. --- test/web/twitter_api/twitter_api_controller_test.exs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/web/twitter_api/twitter_api_controller_test.exs') diff --git a/test/web/twitter_api/twitter_api_controller_test.exs b/test/web/twitter_api/twitter_api_controller_test.exs index 4ab18721d..4b8fa85a5 100644 --- a/test/web/twitter_api/twitter_api_controller_test.exs +++ b/test/web/twitter_api/twitter_api_controller_test.exs @@ -288,7 +288,7 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do |> post("/api/friendships/create.json", %{user_id: followed.id}) current_user = Repo.get(User, current_user.id) - assert current_user.following == [User.ap_followers(followed)] + assert User.ap_followers(followed) in current_user.following assert json_response(conn, 200) == UserView.render("show.json", %{user: followed, for: current_user}) end end @@ -304,7 +304,7 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do followed = insert(:user) {:ok, current_user} = User.follow(current_user, followed) - assert current_user.following == [User.ap_followers(followed)] + assert User.ap_followers(followed) in current_user.following ActivityPub.follow(current_user, followed) conn = conn @@ -312,7 +312,7 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do |> post("/api/friendships/destroy.json", %{user_id: followed.id}) current_user = Repo.get(User, current_user.id) - assert current_user.following == [] + assert current_user.following == [current_user.ap_id] assert json_response(conn, 200) == UserView.render("show.json", %{user: followed, for: current_user}) end end -- cgit v1.2.3