X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Ftasks%2Femoji_test.exs;h=499f098c2a558264c7bb1287283e28d34136ce88;hb=878c7f3f309aa5aaa9eababc2c863248dd4420bb;hp=f2930652afbabbc0061d89757ed6d09d92256d35;hpb=b59ac37b2c09d5dc80b59bd3a2aea36989bee713;p=akkoma diff --git a/test/tasks/emoji_test.exs b/test/tasks/emoji_test.exs index f2930652a..499f098c2 100644 --- a/test/tasks/emoji_test.exs +++ b/test/tasks/emoji_test.exs @@ -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 %{ @@ -157,8 +170,8 @@ defmodule Mix.Tasks.Pleroma.EmojiTest do assert File.exists?(files_json) on_exit(fn -> - File.rm_rf!(pack_json) - File.rm_rf!(files_json) + File.rm!(pack_json) + File.rm!(files_json) end) end @@ -218,8 +231,8 @@ defmodule Mix.Tasks.Pleroma.EmojiTest do assert captured =~ "#{pack_json} has been updated with the pack2 pack" on_exit(fn -> - File.rm_rf!(pack_json) - File.rm_rf!(files_json) + File.rm!(pack_json) + File.rm!(files_json) end) end end