diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-04-06 10:20:44 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-04-06 10:20:44 +0300 |
commit | fc81e5a49c34224e07e85f490a30f92db0835d45 (patch) | |
tree | 347f7eee028404e7e1422ca94ce837bda756e3b3 /test/web/mastodon_api/controllers/suggestion_controller_test.exs | |
parent | 8444e7ee9651f3b1836954a3891b5ae26ee79f99 (diff) | |
download | pleroma-fc81e5a49c34224e07e85f490a30f92db0835d45.tar.gz pleroma-fc81e5a49c34224e07e85f490a30f92db0835d45.zip |
Enforcement of OAuth scopes check for authenticated API endpoints, :skip_plug plug to mark a plug explicitly skipped (disabled).
Diffstat (limited to 'test/web/mastodon_api/controllers/suggestion_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/controllers/suggestion_controller_test.exs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/test/web/mastodon_api/controllers/suggestion_controller_test.exs b/test/web/mastodon_api/controllers/suggestion_controller_test.exs index c697a39f8..8d0e70db8 100644 --- a/test/web/mastodon_api/controllers/suggestion_controller_test.exs +++ b/test/web/mastodon_api/controllers/suggestion_controller_test.exs @@ -7,34 +7,8 @@ defmodule Pleroma.Web.MastodonAPI.SuggestionControllerTest do alias Pleroma.Config - import Pleroma.Factory - import Tesla.Mock - setup do: oauth_access(["read"]) - setup %{user: user} do - other_user = insert(:user) - host = Config.get([Pleroma.Web.Endpoint, :url, :host]) - url500 = "http://test500?#{host}&#{user.nickname}" - url200 = "http://test200?#{host}&#{user.nickname}" - - mock(fn - %{method: :get, url: ^url500} -> - %Tesla.Env{status: 500, body: "bad request"} - - %{method: :get, url: ^url200} -> - %Tesla.Env{ - status: 200, - body: - ~s([{"acct":"yj455","avatar":"https://social.heldscal.la/avatar/201.jpeg","avatar_static":"https://social.heldscal.la/avatar/s/201.jpeg"}, {"acct":"#{ - other_user.ap_id - }","avatar":"https://social.heldscal.la/avatar/202.jpeg","avatar_static":"https://social.heldscal.la/avatar/s/202.jpeg"}]) - } - end) - - [other_user: other_user] - end - test "returns empty result", %{conn: conn} do res = conn |