ConfigTest: Don't crash when whitelist is unset / disabled
This commit is contained in:
parent
49985b1614
commit
77a1d79f92
1 changed files with 16 additions and 0 deletions
|
|
@ -347,5 +347,21 @@ defmodule Mix.Tasks.Pleroma.ConfigTest do
|
||||||
%ConfigDB{group: :web_push_encryption, key: :vapid_details}
|
%ConfigDB{group: :web_push_encryption, key: :vapid_details}
|
||||||
] = config_records()
|
] = config_records()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "filter_whitelisted doesn't crash when whitelist is unset" do
|
||||||
|
clear_config(:database_config_whitelist, nil)
|
||||||
|
|
||||||
|
existing = config_records()
|
||||||
|
MixTask.run(["filter_whitelisted", "--force"])
|
||||||
|
assert config_records() == existing
|
||||||
|
end
|
||||||
|
|
||||||
|
test "filter_whitelisted doesn't crash when whitelist is disabled" do
|
||||||
|
clear_config(:database_config_whitelist, false)
|
||||||
|
|
||||||
|
existing = config_records()
|
||||||
|
MixTask.run(["filter_whitelisted", "--force"])
|
||||||
|
assert config_records() == existing
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue