Fix compatibility with Elixir v1.10
authorEgor Kislitsyn <egor@kislitsyn.com>
Tue, 28 Jan 2020 14:23:59 +0000 (18:23 +0400)
committerEgor Kislitsyn <egor@kislitsyn.com>
Tue, 28 Jan 2020 14:23:59 +0000 (18:23 +0400)
test/runtime_test.exs
test/support/http_request_mock.ex
test/web/mastodon_api/controllers/suggestion_controller_test.exs

index f7b6f23d46e00a763dea47754581648fd5601465..6bde608ae1becefe6aa6ec2509dad0fa51bf165d 100644 (file)
@@ -6,6 +6,6 @@ defmodule Pleroma.RuntimeTest do
   use ExUnit.Case, async: true
 
   test "it loads custom runtime modules" do
-    assert Code.ensure_compiled?(RuntimeModule)
+    assert {:module, RuntimeModule} == Code.ensure_compiled(RuntimeModule)
   end
 end
index f43de700d98a210bb4f2f98340d3d88879277587..ba33413271277862951af05391008094896e83e9 100644 (file)
@@ -19,7 +19,7 @@ defmodule HttpRequestMock do
     else
       error ->
         with {:error, message} <- error do
-          Logger.warn(message)
+          Logger.warn(to_string(message))
         end
 
         {_, _r} = error
index c288c2fffb9e6788156d557eba61b11ea19343f3..0319d347507cbacd0010c2c188097647771fcdea 100644 (file)
@@ -7,7 +7,6 @@ defmodule Pleroma.Web.MastodonAPI.SuggestionControllerTest do
 
   alias Pleroma.Config
 
-  import ExUnit.CaptureLog
   import Pleroma.Factory
   import Tesla.Mock