aboutsummaryrefslogtreecommitdiff
path: root/test/repo_test.exs
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2020-02-25 07:15:33 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2020-02-25 07:22:56 +0300
commit10f452ad1feae9a882b6dc4cd35e09adb7e78208 (patch)
tree62083f08fbe99cd38002d1f6896cd2fd79675320 /test/repo_test.exs
parent28701c08ad9219219a32f31b2ed9dcb83f92cd59 (diff)
parent035c2c1415ed46abb268cf85c141384416a799e2 (diff)
downloadpleroma-10f452ad1feae9a882b6dc4cd35e09adb7e78208.tar.gz
Merge branch 'develop' into issue/1276
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