X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Ftasks%2Finstance_test.exs;h=3b4c041d9f483655ff720780c49577fe6483d246;hb=5a8ea0a5b07c22d567a60af36345483fe880b638;hp=d69275726e280c11e19c8296b3c90c7a741a07d7;hpb=e442ea5722404ca551135b6f4767c016952bbda3;p=akkoma
diff --git a/test/tasks/instance_test.exs b/test/tasks/instance_test.exs
index d69275726..3b4c041d9 100644
--- a/test/tasks/instance_test.exs
+++ b/test/tasks/instance_test.exs
@@ -1,9 +1,9 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.InstanceTest do
- use ExUnit.Case, async: true
+ use ExUnit.Case
setup do
File.mkdir_p!(tmp_path())
@@ -15,6 +15,8 @@ defmodule Pleroma.InstanceTest do
if File.exists?(static_dir) do
File.rm_rf(Path.join(static_dir, "robots.txt"))
end
+
+ Pleroma.Config.put([:instance, :static_dir], static_dir)
end)
:ok
@@ -61,7 +63,7 @@ defmodule Pleroma.InstanceTest do
"--uploads-dir",
"test/uploads",
"--static-dir",
- "instance/static/"
+ "./test/../test/instance/static/"
])
end
@@ -81,6 +83,7 @@ defmodule Pleroma.InstanceTest do
assert generated_config =~ "configurable_from_database: true"
assert generated_config =~ "http: [ip: {127, 0, 0, 1}, port: 4000]"
assert File.read!(tmp_path() <> "setup.psql") == generated_setup_psql()
+ assert File.exists?(Path.expand("./test/instance/static/robots.txt"))
end
defp generated_setup_psql do