Merge branch '1.3.x'

这个提交包含在:
Thomas Citharel 2021-11-08 09:04:54 +01:00
当前提交 1bd32b4e36
找不到此签名对应的密钥
GPG 密钥 ID: A061B9DDE0CA0773
共有 1 个文件被更改,包括 25 次插入0 次删除

查看文件

@ -137,4 +137,29 @@ defmodule Mix.Tasks.Mobilizon.Media.CleanOrphanTest do
size: 13_120
}
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