Cleanup clean_orphan_test.exs
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
2154457be3
commit
e8da59f4a5
|
@ -137,29 +137,4 @@ defmodule Mix.Tasks.Mobilizon.Media.CleanOrphanTest do
|
||||||
size: 13_120
|
size: 13_120
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
defp create_file do
|
|
||||||
File.cp!("test/fixtures/picture.png", "test/fixtures/picture_tmp.png")
|
|
||||||
|
|
||||||
file = %Plug.Upload{
|
|
||||||
content_type: "image/png",
|
|
||||||
path: Path.absname("test/fixtures/picture_tmp.png"),
|
|
||||||
filename: "image.png"
|
|
||||||
}
|
|
||||||
|
|
||||||
{:ok, data} = Mobilizon.Web.Upload.store(file)
|
|
||||||
|
|
||||||
%{
|
|
||||||
content_type: "image/png",
|
|
||||||
name: "image.png",
|
|
||||||
url: url
|
|
||||||
} = data
|
|
||||||
|
|
||||||
%Mobilizon.Medias.File{
|
|
||||||
name: "My Media",
|
|
||||||
url: url,
|
|
||||||
content_type: "image/png",
|
|
||||||
size: 13_120
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue