maintenance: dependency upgrade #81
5 changed files with 11 additions and 0 deletions
|
@ -23,6 +23,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
|
|||
import Tesla.Mock
|
||||
|
||||
setup do
|
||||
clear_config([Pleroma.Upload, :uploader], Pleroma.Uploaders.Local)
|
||||
clear_config([Pleroma.Uploaders.Local, :uploads], "uploads")
|
||||
mock(fn env -> apply(HttpRequestMock, :request, [env]) end)
|
||||
:ok
|
||||
end
|
||||
|
|
|
@ -27,6 +27,8 @@ defmodule Pleroma.Web.CommonAPITest do
|
|||
require Pleroma.Constants
|
||||
|
||||
setup_all do
|
||||
clear_config([Pleroma.Upload, :uploader], Pleroma.Uploaders.Local)
|
||||
clear_config([Pleroma.Uploaders.Local, :uploads], "uploads")
|
||||
Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
|
||||
:ok
|
||||
end
|
||||
|
|
|
@ -13,6 +13,8 @@ defmodule Pleroma.Web.MastodonAPI.MediaControllerTest do
|
|||
|
||||
describe "Upload media" do
|
||||
setup do: oauth_access(["write:media"])
|
||||
setup do: clear_config([Pleroma.Upload, :uploader], Pleroma.Uploaders.Local)
|
||||
setup do: clear_config([Pleroma.Uploaders.Local, :uploads], "uploads")
|
||||
|
||||
setup do
|
||||
image = %Plug.Upload{
|
||||
|
|
|
@ -25,6 +25,8 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
setup do: clear_config([:rich_media, :enabled])
|
||||
setup do: clear_config([:mrf, :policies])
|
||||
setup do: clear_config([:mrf_keyword, :reject])
|
||||
setup do: clear_config([Pleroma.Upload, :uploader], Pleroma.Uploaders.Local)
|
||||
setup do: clear_config([Pleroma.Uploaders.Local, :uploads], "uploads")
|
||||
|
||||
describe "posting statuses" do
|
||||
setup do: oauth_access(["write:statuses"])
|
||||
|
|
|
@ -106,6 +106,9 @@ test "it fails if there is no content", %{conn: conn, user: user} do
|
|||
end
|
||||
|
||||
test "it works with an attachment", %{conn: conn, user: user} do
|
||||
clear_config([Pleroma.Upload, :uploader], Pleroma.Uploaders.Local)
|
||||
clear_config([Pleroma.Uploaders.Local, :uploads], "uploads")
|
||||
|
||||
file = %Plug.Upload{
|
||||
content_type: "image/jpeg",
|
||||
path: Path.absname("test/fixtures/image.jpg"),
|
||||
|
|
Loading…
Reference in a new issue