test "add emojies from zip file", %{pack: pack} do
file = %Plug.Upload{
content_type: "application/zip",
- filename: "finland-emojis.zip",
- path: Path.absname("test/fixtures/finland-emojis.zip")
+ filename: "emojis.zip",
+ path: Path.absname("test/fixtures/emojis.zip")
}
{:ok, updated_pack} = Pack.add_file(pack, nil, nil, file)
test "returns error when zip file is bad", %{pack: pack} do
file = %Plug.Upload{
content_type: "application/zip",
- filename: "finland-emojis.zip",
+ filename: "emojis.zip",
path: Path.absname("test/instance_static/emoji/test_pack/blank.png")
}
test "returns pack when zip file is empty", %{pack: pack} do
file = %Plug.Upload{
content_type: "application/zip",
- filename: "finland-emojis.zip",
+ filename: "emojis.zip",
path: Path.absname("test/fixtures/empty.zip")
}
|> post("/api/pleroma/emoji/packs/test_pack/files", %{
file: %Plug.Upload{
content_type: "application/zip",
- filename: "finland-emojis.zip",
- path: Path.absname("test/fixtures/finland-emojis.zip")
+ filename: "emojis.zip",
+ path: Path.absname("test/fixtures/emojis.zip")
}
})
|> json_response_and_validate_schema(200)