summaryrefslogtreecommitdiff
path: root/test/web/twitter_api
diff options
context:
space:
mode:
Diffstat (limited to 'test/web/twitter_api')
-rw-r--r--test/web/twitter_api/twitter_api_controller_test.exs7
-rw-r--r--test/web/twitter_api/twitter_api_test.exs3
2 files changed, 4 insertions, 6 deletions
diff --git a/test/web/twitter_api/twitter_api_controller_test.exs b/test/web/twitter_api/twitter_api_controller_test.exs
index 05cd084b4..f8afbaee5 100644
--- a/test/web/twitter_api/twitter_api_controller_test.exs
+++ b/test/web/twitter_api/twitter_api_controller_test.exs
@@ -245,6 +245,7 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
{:ok, current_user} = User.follow(current_user, followed)
assert current_user.following == [User.ap_followers(followed)]
+ ActivityPub.follow(current_user, followed)
conn = conn
|> with_credentials(current_user.nickname, "test")
@@ -397,10 +398,4 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
header_content = "Basic " <> Base.encode64("#{username}:#{password}")
put_req_header(conn, "authorization", header_content)
end
-
- setup do
- Supervisor.terminate_child(Pleroma.Supervisor, ConCache)
- Supervisor.restart_child(Pleroma.Supervisor, ConCache)
- :ok
- end
end
diff --git a/test/web/twitter_api/twitter_api_test.exs b/test/web/twitter_api/twitter_api_test.exs
index a92440f32..9a7dc48da 100644
--- a/test/web/twitter_api/twitter_api_test.exs
+++ b/test/web/twitter_api/twitter_api_test.exs
@@ -190,6 +190,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
test "Unfollow another user using user_id" do
unfollowed = insert(:user)
user = insert(:user, %{following: [User.ap_followers(unfollowed)]})
+ ActivityPub.follow(user, unfollowed)
{:ok, user, unfollowed } = TwitterAPI.unfollow(user, %{"user_id" => unfollowed.id})
assert user.following == []
@@ -202,6 +203,8 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
unfollowed = insert(:user)
user = insert(:user, %{following: [User.ap_followers(unfollowed)]})
+ ActivityPub.follow(user, unfollowed)
+
{:ok, user, unfollowed } = TwitterAPI.unfollow(user, %{"screen_name" => unfollowed.nickname})
assert user.following == []