diff options
author | lain <lain@soykaf.club> | 2020-05-16 17:07:09 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-05-16 17:07:09 +0000 |
commit | d15aa9d9503e59b3cd0731394855781f435ec63c (patch) | |
tree | 844810415def046a2fc886d0bc1baeb1ff9afb21 /test/web/mastodon_api/controllers/app_controller_test.exs | |
parent | 9cf4c4fa73e68f03791c5cc70505b710be39b677 (diff) | |
parent | 3bc1138dd9beec03d2336fa1ad45dd23816f5285 (diff) | |
download | pleroma-d15aa9d9503e59b3cd0731394855781f435ec63c.tar.gz pleroma-d15aa9d9503e59b3cd0731394855781f435ec63c.zip |
Merge branch 'develop' into 'remove-twitter-api'
# Conflicts:
# lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
Diffstat (limited to 'test/web/mastodon_api/controllers/app_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/controllers/app_controller_test.exs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/web/mastodon_api/controllers/app_controller_test.exs b/test/web/mastodon_api/controllers/app_controller_test.exs index 77d234d67..a0b8b126c 100644 --- a/test/web/mastodon_api/controllers/app_controller_test.exs +++ b/test/web/mastodon_api/controllers/app_controller_test.exs @@ -16,8 +16,7 @@ defmodule Pleroma.Web.MastodonAPI.AppControllerTest do conn = conn - |> assign(:user, token.user) - |> assign(:token, token) + |> put_req_header("authorization", "Bearer #{token.token}") |> get("/api/v1/apps/verify_credentials") app = Repo.preload(token, :app).app @@ -28,7 +27,7 @@ defmodule Pleroma.Web.MastodonAPI.AppControllerTest do "vapid_key" => Push.vapid_config() |> Keyword.get(:public_key) } - assert expected == json_response(conn, 200) + assert expected == json_response_and_validate_schema(conn, 200) end test "creates an oauth app", %{conn: conn} do @@ -37,6 +36,7 @@ defmodule Pleroma.Web.MastodonAPI.AppControllerTest do conn = conn + |> put_req_header("content-type", "application/json") |> assign(:user, user) |> post("/api/v1/apps", %{ client_name: app_attrs.client_name, @@ -55,6 +55,6 @@ defmodule Pleroma.Web.MastodonAPI.AppControllerTest do "vapid_key" => Push.vapid_config() |> Keyword.get(:public_key) } - assert expected == json_response(conn, 200) + assert expected == json_response_and_validate_schema(conn, 200) end end |