mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
UploadMediaPlugTest: Fix tests
This commit is contained in:
parent
dd0cf0371a
commit
d62b17eb60
1 changed files with 15 additions and 0 deletions
|
@ -4,10 +4,18 @@
|
|||
|
||||
defmodule Pleroma.Web.Plugs.UploadedMediaPlugTest do
|
||||
use Pleroma.Web.ConnCase, async: true
|
||||
|
||||
alias Pleroma.UnstubbedConfigMock, as: ConfigMock
|
||||
alias Pleroma.Upload
|
||||
|
||||
import Mox
|
||||
|
||||
defp upload_file(context) do
|
||||
ConfigMock
|
||||
|> stub_with(Pleroma.Test.StaticConfig)
|
||||
|
||||
Pleroma.DataCase.ensure_local_uploader(context)
|
||||
|
||||
File.cp!("test/fixtures/image.jpg", "test/fixtures/image_tmp.jpg")
|
||||
|
||||
file = %Plug.Upload{
|
||||
|
@ -23,6 +31,13 @@ defmodule Pleroma.Web.Plugs.UploadedMediaPlugTest do
|
|||
|
||||
setup_all :upload_file
|
||||
|
||||
setup do
|
||||
ConfigMock
|
||||
|> stub_with(Pleroma.Test.StaticConfig)
|
||||
|
||||
:ok
|
||||
end
|
||||
|
||||
test "does not send Content-Disposition header when name param is not set", %{
|
||||
attachment_url: attachment_url
|
||||
} do
|
||||
|
|
Loading…
Reference in a new issue