X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fostatus%2Fostatus_test.exs;h=e577a6bee50e1cadc01a3f5e33e656c837683926;hb=a3003364598b42849e384a216948dad810481f51;hp=32bf6691b5e3e37575c8e98e5491521a8c8a662d;hpb=91065e1968e97d299aa708b938cbef18c2cd1271;p=akkoma diff --git a/test/web/ostatus/ostatus_test.exs b/test/web/ostatus/ostatus_test.exs index 32bf6691b..e577a6bee 100644 --- a/test/web/ostatus/ostatus_test.exs +++ b/test/web/ostatus/ostatus_test.exs @@ -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) @@ -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)