Merge branch 'fix/1658-invite-send' into 'develop'
[akkoma] / test / web / mastodon_api / controllers / app_controller_test.exs
index 77d234d67eea6675b3e7e9b90c501f175ccc734f..e7b11d14e1461fa910f72ddd73c8b5359a4f5b21 100644 (file)
@@ -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
@@ -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,