Fix uploaded media plug test
This commit is contained in:
parent
e2fe796c63
commit
355f285a86
1 changed files with 4 additions and 1 deletions
|
@ -6,7 +6,8 @@ defmodule Pleroma.Web.UploadedMediaPlugTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase
|
||||||
alias Pleroma.Upload
|
alias Pleroma.Upload
|
||||||
|
|
||||||
setup_all do
|
defp upload_file(context) do
|
||||||
|
Pleroma.DataCase.ensure_local_uploader(context)
|
||||||
File.cp!("test/fixtures/image.jpg", "test/fixtures/image_tmp.jpg")
|
File.cp!("test/fixtures/image.jpg", "test/fixtures/image_tmp.jpg")
|
||||||
|
|
||||||
file = %Plug.Upload{
|
file = %Plug.Upload{
|
||||||
|
@ -20,6 +21,8 @@ defmodule Pleroma.Web.UploadedMediaPlugTest do
|
||||||
[attachment_url: attachment_url]
|
[attachment_url: attachment_url]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
setup_all :upload_file
|
||||||
|
|
||||||
test "does not send Content-Disposition header when name param is not set", %{
|
test "does not send Content-Disposition header when name param is not set", %{
|
||||||
attachment_url: attachment_url
|
attachment_url: attachment_url
|
||||||
} do
|
} do
|
||||||
|
|
Loading…
Reference in a new issue