diff options
author | Ekaterina Vaartis <vaartis@cock.li> | 2019-08-12 18:03:59 +0300 |
---|---|---|
committer | Ekaterina Vaartis <vaartis@cock.li> | 2019-09-19 00:16:33 +0300 |
commit | 2d4b8f3d20c4dbf60e52e95e77f2e77766974402 (patch) | |
tree | cf0903819764653896dba647293f7a547be6d96c /test/web | |
parent | 3a8669b48771ac4203b6abf2a372c6960d36345a (diff) | |
download | pleroma-2d4b8f3d20c4dbf60e52e95e77f2e77766974402.tar.gz |
Add an endpoint for deleting emoji packs
Diffstat (limited to 'test/web')
-rw-r--r-- | test/web/emoji_api_controller_test.exs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/web/emoji_api_controller_test.exs b/test/web/emoji_api_controller_test.exs index c037883ee..13a34d38d 100644 --- a/test/web/emoji_api_controller_test.exs +++ b/test/web/emoji_api_controller_test.exs @@ -42,7 +42,7 @@ defmodule Pleroma.Web.EmojiAPI.EmojiAPIControllerTest do assert Enum.find(arch, fn {n, _} -> n == 'blank.png' end) end - test "downloading a shared pack from another instance via download_from" do + test "downloading a shared pack from another instance via download_from, deleting it" do on_exit(fn -> File.rm_rf!("test/instance_static/emoji/test_pack2") end) @@ -94,5 +94,12 @@ defmodule Pleroma.Web.EmojiAPI.EmojiAPIControllerTest do assert File.exists?("test/instance_static/emoji/test_pack2/pack.yml") assert File.exists?("test/instance_static/emoji/test_pack2/blank.png") + + assert conn + |> assign(:user, admin) + |> delete(emoji_api_path(conn, :delete, "test_pack2")) + |> response(200) == "ok" + + refute File.exists?("test/instance_static/emoji/test_pack2") end end |