diff options
author | Mark Felder <feld@FreeBSD.org> | 2019-05-01 12:32:17 -0500 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2019-05-01 12:32:17 -0500 |
commit | 3c4cab9be18ff543d025177b418ddd0b16050e68 (patch) | |
tree | 3b4d32c978ecfaa656256509bf390d6ca22c6679 /test/web/twitter_api/util_controller_test.exs | |
parent | 9a98f48ec3f438e543a5a621624401bb22a0d44a (diff) | |
parent | 41d78f91083b5017e6085150bfae71a842f5c47f (diff) | |
download | pleroma-3c4cab9be18ff543d025177b418ddd0b16050e68.tar.gz pleroma-3c4cab9be18ff543d025177b418ddd0b16050e68.zip |
Merge branch 'develop' into update-oauth-template
Diffstat (limited to 'test/web/twitter_api/util_controller_test.exs')
-rw-r--r-- | test/web/twitter_api/util_controller_test.exs | 21 |
1 files changed, 21 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..56474447b 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"]) @@ -230,4 +245,10 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do assert html_response(response, 200) =~ "Log in to follow" end end + + test "GET /api/pleroma/healthcheck", %{conn: conn} do + conn = get(conn, "/api/pleroma/healthcheck") + + assert conn.status in [200, 503] + end end |