get-packs for local generated pack
This commit is contained in:
parent
089d72d2e6
commit
ae05792d2a
4 changed files with 47 additions and 17 deletions
3
test/instance_static/local_pack/files.json
Normal file
3
test/instance_static/local_pack/files.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"blank": "blank.png"
|
||||
}
|
||||
10
test/instance_static/local_pack/manifest.json
Normal file
10
test/instance_static/local_pack/manifest.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"local": {
|
||||
"src_sha256": "384025A1AC6314473863A11AC7AB38A12C01B851A3F82359B89B4D4211D3291D",
|
||||
"src": "test/fixtures/emoji/packs/blank.png.zip",
|
||||
"license": "Apache 2.0",
|
||||
"homepage": "https://example.com",
|
||||
"files": "files.json",
|
||||
"description": "Some local pack"
|
||||
}
|
||||
}
|
||||
|
|
@ -73,6 +73,19 @@ defmodule Mix.Tasks.Pleroma.EmojiTest do
|
|||
on_exit(fn -> File.rm_rf!("test/instance_static/emoji/finmoji") end)
|
||||
end
|
||||
|
||||
test "install local emoji pack" do
|
||||
assert capture_io(fn ->
|
||||
Emoji.run([
|
||||
"get-packs",
|
||||
"local",
|
||||
"--manifest",
|
||||
"test/instance_static/local_pack/manifest.json"
|
||||
])
|
||||
end) =~ "Writing pack.json for"
|
||||
|
||||
on_exit(fn -> File.rm_rf!("test/instance_static/emoji/local") end)
|
||||
end
|
||||
|
||||
test "pack not found" do
|
||||
mock(fn
|
||||
%{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue