diff --git a/lib/pleroma/web/federator/federator.ex b/lib/pleroma/web/federator/federator.ex index 6dbf07e13..a9c7aecd5 100644 --- a/lib/pleroma/web/federator/federator.ex +++ b/lib/pleroma/web/federator/federator.ex @@ -150,7 +150,7 @@ def handle(type, _) do end if Mix.env() == :test do - def enqueue(type, payload, priority \\ 1) do + def enqueue(type, payload, _priority \\ 1) do if Pleroma.Config.get([:instance, :federating]) do handle(type, payload) end diff --git a/mix.exs b/mix.exs index bd9bce766..1283ca33f 100644 --- a/mix.exs +++ b/mix.exs @@ -8,6 +8,11 @@ def project do elixir: "~> 1.4", elixirc_paths: elixirc_paths(Mix.env()), compilers: [:phoenix, :gettext] ++ Mix.compilers(), + elixirc_options: if Mix.env() == :test do + [] + else + [warnings_as_errors: true] + end, start_permanent: Mix.env() == :prod, aliases: aliases(), deps: deps(), diff --git a/test/support/builders/activity_builder.ex b/test/support/builders/activity_builder.ex index eb72d5ba9..6e5a8e059 100644 --- a/test/support/builders/activity_builder.ex +++ b/test/support/builders/activity_builder.ex @@ -1,5 +1,4 @@ defmodule Pleroma.Builders.ActivityBuilder do - alias Pleroma.Builders.UserBuilder alias Pleroma.Web.ActivityPub.ActivityPub def build(data \\ %{}, opts \\ %{}) do diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index 391342ad7..6f98fc5d0 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -13,7 +13,7 @@ def request( with {:ok, res} <- apply(__MODULE__, method, [url, query, body, headers]) do res else - {_, r} = error -> + {_, _r} = error -> # Logger.warn(r) error end diff --git a/test/support/websub_mock.ex b/test/support/websub_mock.ex new file mode 100644 index 000000000..0cba0b740 --- /dev/null +++ b/test/support/websub_mock.ex @@ -0,0 +1,5 @@ +defmodule Pleroma.Web.WebsubMock do + def verify(sub) do + {:ok, sub} + end +end diff --git a/test/web/websub/websub_test.exs b/test/web/websub/websub_test.exs index 47d1a88e1..fd559743f 100644 --- a/test/web/websub/websub_test.exs +++ b/test/web/websub/websub_test.exs @@ -1,9 +1,3 @@ -defmodule Pleroma.Web.WebsubMock do - def verify(sub) do - {:ok, sub} - end -end - defmodule Pleroma.Web.WebsubTest do use Pleroma.DataCase alias Pleroma.Web.Websub