Merge branch 'develop' into fix/reports-from-admins
This commit is contained in:
commit
d047372291
11 changed files with 39 additions and 23 deletions
1
test/config/emoji.txt
Normal file
1
test/config/emoji.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
external_emoji, https://example.com/emoji.png
|
||||
|
|
@ -31,7 +31,7 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do
|
|||
|
||||
assert json_response_and_validate_schema(conn, 400) ==
|
||||
%{
|
||||
"error" => "To use this endpoint you need to enable configuration from database."
|
||||
"error" => "You must enable configurable_from_database in your config file."
|
||||
}
|
||||
end
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do
|
|||
|> post("/api/pleroma/admin/config", %{"configs" => []})
|
||||
|
||||
assert json_response_and_validate_schema(conn, 400) ==
|
||||
%{"error" => "To use this endpoint you need to enable configuration from database."}
|
||||
%{"error" => "You must enable configurable_from_database in your config file."}
|
||||
end
|
||||
|
||||
describe "POST /api/pleroma/admin/config" do
|
||||
|
|
|
|||
|
|
@ -144,13 +144,19 @@ defmodule Pleroma.Web.OStatus.OStatusControllerTest do
|
|||
assert redirect_url == expected_redirect_url
|
||||
end
|
||||
|
||||
test "returns a 404 on remote notice when json requested", %{conn: conn} do
|
||||
test "redirects to a proper object URL when json requested and the object is remote", %{
|
||||
conn: conn
|
||||
} do
|
||||
note_activity = insert(:note_activity, local: false)
|
||||
expected_redirect_url = Object.normalize(note_activity, fetch: false).data["id"]
|
||||
|
||||
conn
|
||||
|> put_req_header("accept", "application/activity+json")
|
||||
|> get("/notice/#{note_activity.id}")
|
||||
|> response(404)
|
||||
redirect_url =
|
||||
conn
|
||||
|> put_req_header("accept", "application/activity+json")
|
||||
|> get("/notice/#{note_activity.id}")
|
||||
|> redirected_to()
|
||||
|
||||
assert redirect_url == expected_redirect_url
|
||||
end
|
||||
|
||||
test "500s when actor not found", %{conn: conn} do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue