forked from YokaiRick/akkoma
More static stuff
This commit is contained in:
parent
02071ab9b4
commit
f4fe4fcbcc
2 changed files with 5 additions and 2 deletions
|
@ -3,9 +3,10 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Emoji.PackTest do
|
defmodule Pleroma.Emoji.PackTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: false
|
||||||
alias Pleroma.Emoji.Pack
|
alias Pleroma.Emoji.Pack
|
||||||
|
|
||||||
|
@static_dir Pleroma.Config.get!([:instance, :static_dir])
|
||||||
@emoji_path Path.join(
|
@emoji_path Path.join(
|
||||||
Pleroma.Config.get!([:instance, :static_dir]),
|
Pleroma.Config.get!([:instance, :static_dir]),
|
||||||
"emoji"
|
"emoji"
|
||||||
|
@ -14,6 +15,7 @@ defmodule Pleroma.Emoji.PackTest do
|
||||||
setup do
|
setup do
|
||||||
pack_path = Path.join(@emoji_path, "dump_pack")
|
pack_path = Path.join(@emoji_path, "dump_pack")
|
||||||
File.mkdir_p!(pack_path)
|
File.mkdir_p!(pack_path)
|
||||||
|
clear_config([:instance, :static_dir], @static_dir)
|
||||||
|
|
||||||
File.write!(Path.join(pack_path, "pack.json"), """
|
File.write!(Path.join(pack_path, "pack.json"), """
|
||||||
{
|
{
|
||||||
|
@ -34,7 +36,7 @@ defmodule Pleroma.Emoji.PackTest do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "add_file/4" do
|
describe "add_file/4" do
|
||||||
test "add emojies from zip file", %{pack: pack} do
|
test "add emojis from zip file", %{pack: pack} do
|
||||||
file = %Plug.Upload{
|
file = %Plug.Upload{
|
||||||
content_type: "application/zip",
|
content_type: "application/zip",
|
||||||
filename: "emojis.zip",
|
filename: "emojis.zip",
|
||||||
|
|
|
@ -25,6 +25,7 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
|
||||||
end
|
end
|
||||||
|
|
||||||
setup do: clear_config([:instance, :max_remote_account_fields])
|
setup do: clear_config([:instance, :max_remote_account_fields])
|
||||||
|
setup do: clear_config([Pleroma.Upload, :uploader], Pleroma.Uploaders.Local)
|
||||||
|
|
||||||
describe "handle_incoming" do
|
describe "handle_incoming" do
|
||||||
test "it works for incoming unfollows with an existing follow" do
|
test "it works for incoming unfollows with an existing follow" do
|
||||||
|
|
Loading…
Reference in a new issue