summaryrefslogtreecommitdiff
path: root/test/web/twitter_api/twitter_api_controller_test.exs
diff options
context:
space:
mode:
authoreal <eal@waifu.club>2017-11-20 07:52:02 +0200
committereal <eal@waifu.club>2017-11-20 07:52:02 +0200
commitedc3e5bc3014b1ca395038736dd8fd6b6aeed560 (patch)
tree9a078249990ca6b22f966a35e587790888c17385 /test/web/twitter_api/twitter_api_controller_test.exs
parent4db5954786b60df84b833feb360fd8c81be956d9 (diff)
downloadpleroma-edc3e5bc3014b1ca395038736dd8fd6b6aeed560.tar.gz
pleroma-edc3e5bc3014b1ca395038736dd8fd6b6aeed560.zip
Make users in tests follow themselves by default.
Also fix the semantics of all tests to match.
Diffstat (limited to 'test/web/twitter_api/twitter_api_controller_test.exs')
-rw-r--r--test/web/twitter_api/twitter_api_controller_test.exs6
1 files changed, 3 insertions, 3 deletions
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