projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'whole-word-filter-hotfix' into 'develop'
[akkoma]
/
test
/
web
/
mastodon_api
/
controllers
/
app_controller_test.exs
diff --git
a/test/web/mastodon_api/controllers/app_controller_test.exs
b/test/web/mastodon_api/controllers/app_controller_test.exs
index 51788155bf86b80b6a1eca82a3a9401fc5cf3cea..a0b8b126c9536594ba307b875bfa41ff7477bb78 100644
(file)
--- a/
test/web/mastodon_api/controllers/app_controller_test.exs
+++ b/
test/web/mastodon_api/controllers/app_controller_test.exs
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.AppControllerTest do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.AppControllerTest do
@@
-16,8
+16,7
@@
defmodule Pleroma.Web.MastodonAPI.AppControllerTest do
conn =
conn
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
|> 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)
}
"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
end
test "creates an oauth app", %{conn: conn} do
@@
-37,6
+36,7
@@
defmodule Pleroma.Web.MastodonAPI.AppControllerTest do
conn =
conn
conn =
conn
+ |> put_req_header("content-type", "application/json")
|> assign(:user, user)
|> post("/api/v1/apps", %{
client_name: app_attrs.client_name,
|> 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)
}
"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
end
end