diff options
| author | rinpatch <rinpatch@sdf.org> | 2020-04-16 21:58:57 +0000 | 
|---|---|---|
| committer | rinpatch <rinpatch@sdf.org> | 2020-05-01 00:58:40 +0300 | 
| commit | da4923f2e59aac7f97812a756593602083f17626 (patch) | |
| tree | d1005de73b478574d129abeb29c90c87168bac5e /test/web/mastodon_api/controllers | |
| parent | 1ebf8db2a595c04da0e0ecbcd9c78b8833deecda (diff) | |
| download | pleroma-da4923f2e59aac7f97812a756593602083f17626.tar.gz pleroma-da4923f2e59aac7f97812a756593602083f17626.zip  | |
Merge branch 'authenticated-api-oauth-check-enforcement' into 'develop'
Enforcement of OAuth scopes check for authenticated API endpoints
See merge request pleroma/pleroma!2349
Diffstat (limited to 'test/web/mastodon_api/controllers')
| -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  | 
