Merge branch 'develop' into oembed_provider
[akkoma] / test / web / ostatus / ostatus_test.exs
index baa8cac72bd729b21e018d90ce983f0f9ab15962..e577a6bee50e1cadc01a3f5e33e656c837683926 100644 (file)
@@ -6,6 +6,11 @@ defmodule Pleroma.Web.OStatusTest do
   import Pleroma.Factory
   import ExUnit.CaptureLog
 
+  setup_all do
+    Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
+    :ok
+  end
+
   test "don't insert create notes twice" do
     incoming = File.read!("test/fixtures/incoming_note_activity.xml")
     {:ok, [activity]} = OStatus.handle_incoming(incoming)
@@ -337,7 +342,7 @@ defmodule Pleroma.Web.OStatusTest do
                %Pleroma.User.Info{
                  id: user.info.id,
                  ap_enabled: false,
-                 background: nil,
+                 background: %{},
                  banner: %{},
                  blocks: [],
                  deactivated: false,
@@ -506,7 +511,7 @@ defmodule Pleroma.Web.OStatusTest do
         |> Map.put("type", "Article")
 
       cs = Object.change(note_object, %{data: note_data})
-      {:ok, article_object} = Repo.update(cs)
+      {:ok, _article_object} = Repo.update(cs)
 
       # the underlying object is now an Article instead of a note, so this should fail
       refute OStatus.is_representable?(note_activity)