Fix /api/ap/whoami test with cookie auth

This commit is contained in:
Alex Gleason 2020-07-30 14:28:13 -05:00
parent c412e620cb
commit 14cc0c5acb
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

View File

@ -1446,6 +1446,11 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
describe "Additional ActivityPub C2S endpoints" do
test "GET /api/ap/whoami", %{conn: conn} do
# Test the 403 first because a user cookie gets set below
conn
|> get("/api/ap/whoami")
|> json_response(403)
user = insert(:user)
conn =
@ -1456,10 +1461,6 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
user = User.get_cached_by_id(user.id)
assert UserView.render("user.json", %{user: user}) == json_response(conn, 200)
conn
|> get("/api/ap/whoami")
|> json_response(403)
end
setup do: clear_config([:media_proxy])