Fix warnings in tests, treat warnings as errors in CI.

The warnings revealed two bad tests, the code still worked but the test
didn't actually test for it. Activating this for CI to prevent issues
like these in the future.
This commit is contained in:
Lain Soykaf 2023-01-03 14:59:14 -05:00
commit 72b3ec35f8
6 changed files with 6 additions and 5 deletions

View file

@ -65,7 +65,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.EmojiReactHandlingTest do
object = Object.get_by_ap_id(data["object"])
assert object.data["reaction_count"] == 1
assert match?([[emoji, _]], object.data["reactions"])
assert match?([[^emoji, _]], object.data["reactions"])
end
test "it reject invalid emoji reactions" do

View file

@ -375,7 +375,9 @@ defmodule Pleroma.Web.MastodonAPI.UpdateCredentialsTest do
"pleroma_background_image" => new_background_oversized
})
assert user_response = json_response_and_validate_schema(res, 413)
assert %{"error" => "File is too large"} == json_response_and_validate_schema(res, 413)
user = Repo.get(User, user.id)
assert user.background == %{}
clear_config([:instance, :upload_limit], upload_limit)