Convert tests to all use clear_config instead of Pleroma.Config.put

This commit is contained in:
Mark Felder 2021-01-26 11:58:43 -06:00
commit e854c35e65
69 changed files with 325 additions and 368 deletions

View file

@ -12,7 +12,7 @@ defmodule Mix.Tasks.Pleroma.RobotsTxtTest do
test "creates new dir" do
path = "test/fixtures/new_dir/"
file_path = path <> "robots.txt"
Pleroma.Config.put([:instance, :static_dir], path)
clear_config([:instance, :static_dir], path)
on_exit(fn ->
{:ok, ["test/fixtures/new_dir/", "test/fixtures/new_dir/robots.txt"]} = File.rm_rf(path)
@ -29,7 +29,7 @@ defmodule Mix.Tasks.Pleroma.RobotsTxtTest do
test "to existance folder" do
path = "test/fixtures/"
file_path = path <> "robots.txt"
Pleroma.Config.put([:instance, :static_dir], path)
clear_config([:instance, :static_dir], path)
on_exit(fn ->
:ok = File.rm(file_path)