summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-01-12 12:14:09 -0600
committerMark Felder <feld@FreeBSD.org>2020-01-12 12:14:09 -0600
commite64059d218871ae3910dd00ba5bcffaafb96d74b (patch)
treea3fe05a598a7f4791c701622adb27ed26b44a0d3
parent2f5b8fbeb3830759c00675f99d893a92b1d3edb2 (diff)
Assign token that can write to follows
-rw-r--r--test/web/twitter_api/remote_follow_controller_test.exs2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/web/twitter_api/remote_follow_controller_test.exs b/test/web/twitter_api/remote_follow_controller_test.exs
index dd2f00dfe..444949375 100644
--- a/test/web/twitter_api/remote_follow_controller_test.exs
+++ b/test/web/twitter_api/remote_follow_controller_test.exs
@@ -95,6 +95,7 @@ defmodule Pleroma.Web.TwitterAPI.RemoteFollowControllerTest do
response =
conn
|> assign(:user, user)
+ |> assign(:token, insert(:oauth_token, user: user, scopes: ["write:follows"]))
|> post(remote_follow_path(conn, :do_follow), %{"user" => %{"id" => user2.id}})
|> response(200)
@@ -151,6 +152,7 @@ defmodule Pleroma.Web.TwitterAPI.RemoteFollowControllerTest do
response =
conn
|> assign(:user, refresh_record(user))
+ |> assign(:token, insert(:oauth_token, user: user, scopes: ["write:follows"]))
|> post(remote_follow_path(conn, :do_follow), %{"user" => %{"id" => user2.id}})
|> response(200)