summaryrefslogtreecommitdiff
path: root/test/web/twitter_api/util_controller_test.exs
diff options
context:
space:
mode:
Diffstat (limited to 'test/web/twitter_api/util_controller_test.exs')
-rw-r--r--test/web/twitter_api/util_controller_test.exs15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/web/twitter_api/util_controller_test.exs b/test/web/twitter_api/util_controller_test.exs
index a4b3d651a..c58b49ea4 100644
--- a/test/web/twitter_api/util_controller_test.exs
+++ b/test/web/twitter_api/util_controller_test.exs
@@ -26,6 +26,21 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
assert response == "job started"
end
+ test "it imports new-style mastodon follow lists", %{conn: conn} do
+ user1 = insert(:user)
+ user2 = insert(:user)
+
+ response =
+ conn
+ |> assign(:user, user1)
+ |> post("/api/pleroma/follow_import", %{
+ "list" => "Account address,Show boosts\n#{user2.ap_id},true"
+ })
+ |> json_response(:ok)
+
+ assert response == "job started"
+ end
+
test "requires 'follow' permission", %{conn: conn} do
token1 = insert(:oauth_token, scopes: ["read", "write"])
token2 = insert(:oauth_token, scopes: ["follow"])