Tests: Stub the pipeline in all tests.
Restores the old un-moxed behavior.
This commit is contained in:
parent
5db1e6c8d3
commit
1a3da01a65
@ -136,6 +136,8 @@ defmodule Pleroma.Web.ConnCase do
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Pleroma.DataCase.stub_pipeline()
|
||||||
|
|
||||||
{:ok, conn: Phoenix.ConnTest.build_conn()}
|
{:ok, conn: Phoenix.ConnTest.build_conn()}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -83,9 +83,25 @@ defmodule Pleroma.DataCase do
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
stub_pipeline()
|
||||||
|
|
||||||
:ok
|
:ok
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def stub_pipeline do
|
||||||
|
Mox.stub_with(Pleroma.Web.ActivityPub.SideEffectsMock, Pleroma.Web.ActivityPub.SideEffects)
|
||||||
|
|
||||||
|
Mox.stub_with(
|
||||||
|
Pleroma.Web.ActivityPub.ObjectValidatorMock,
|
||||||
|
Pleroma.Web.ActivityPub.ObjectValidator
|
||||||
|
)
|
||||||
|
|
||||||
|
Mox.stub_with(Pleroma.Web.ActivityPub.MRFMock, Pleroma.Web.ActivityPub.MRF)
|
||||||
|
Mox.stub_with(Pleroma.Web.ActivityPub.ActivityPubMock, Pleroma.Web.ActivityPub.ActivityPub)
|
||||||
|
Mox.stub_with(Pleroma.Web.FederatorMock, Pleroma.Web.Federator)
|
||||||
|
Mox.stub_with(Pleroma.ConfigMock, Pleroma.Config)
|
||||||
|
end
|
||||||
|
|
||||||
def ensure_local_uploader(context) do
|
def ensure_local_uploader(context) do
|
||||||
test_uploader = Map.get(context, :uploader, Pleroma.Uploaders.Local)
|
test_uploader = Map.get(context, :uploader, Pleroma.Uploaders.Local)
|
||||||
uploader = Pleroma.Config.get([Pleroma.Upload, :uploader])
|
uploader = Pleroma.Config.get([Pleroma.Upload, :uploader])
|
||||||
|
Loading…
Reference in New Issue
Block a user