summaryrefslogtreecommitdiff
path: root/test/repo_test.exs
diff options
context:
space:
mode:
authorAlexander Strizhakov <alex.strizhakov@gmail.com>2020-02-21 10:02:37 +0300
committerAlexander Strizhakov <alex.strizhakov@gmail.com>2020-02-21 10:02:37 +0300
commit13918cb545d583decfb728300850b307c59e2031 (patch)
tree9bf3d5f4c2e51eec87bd0cd1e8a46a6b94816bfc /test/repo_test.exs
parentc9db0507f8d49aee9988b0b63477672f5df9c0b2 (diff)
parent292031f6dd809accbcb3a5ba59d0100d807c5d72 (diff)
downloadpleroma-13918cb545d583decfb728300850b307c59e2031.tar.gz
pleroma-13918cb545d583decfb728300850b307c59e2031.zip
Merge branch 'develop' into gun
Diffstat (limited to 'test/repo_test.exs')
-rw-r--r--test/repo_test.exs12
1 files changed, 2 insertions, 10 deletions
diff --git a/test/repo_test.exs b/test/repo_test.exs
index 5526b0327..2224a6b2b 100644
--- a/test/repo_test.exs
+++ b/test/repo_test.exs
@@ -67,6 +67,8 @@ defmodule Pleroma.RepoTest do
:ok
end
+ clear_config([:i_am_aware_this_may_cause_data_loss, :disable_migration_check])
+
test "raises if it detects unapplied migrations" do
assert_raise Pleroma.Repo.UnappliedMigrationsError, fn ->
capture_log(&Repo.check_migrations_applied!/0)
@@ -74,18 +76,8 @@ defmodule Pleroma.RepoTest do
end
test "doesn't do anything if disabled" do
- disable_migration_check =
- Pleroma.Config.get([:i_am_aware_this_may_cause_data_loss, :disable_migration_check])
-
Pleroma.Config.put([:i_am_aware_this_may_cause_data_loss, :disable_migration_check], true)
- on_exit(fn ->
- Pleroma.Config.put(
- [:i_am_aware_this_may_cause_data_loss, :disable_migration_check],
- disable_migration_check
- )
- end)
-
assert :ok == Repo.check_migrations_applied!()
end
end