projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change to not require `magic-public-key` on WebFinger
[akkoma]
/
test
/
tasks
/
config_test.exs
diff --git
a/test/tasks/config_test.exs
b/test/tasks/config_test.exs
index 83a363356c302c922b03969d0ab794a823946f1e..a9b79eb5b572a8bcf44fa1a137063059c7c807b8 100644
(file)
--- a/
test/tasks/config_test.exs
+++ b/
test/tasks/config_test.exs
@@
-1,3
+1,7
@@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Mix.Tasks.Pleroma.ConfigTest do
use Pleroma.DataCase
alias Pleroma.Repo
defmodule Mix.Tasks.Pleroma.ConfigTest do
use Pleroma.DataCase
alias Pleroma.Repo
@@
-30,8
+34,8
@@
defmodule Mix.Tasks.Pleroma.ConfigTest do
Mix.Tasks.Pleroma.Config.run(["migrate_to_db"])
Mix.Tasks.Pleroma.Config.run(["migrate_to_db"])
- first_db = Config.get_by_params(%{group: "pleroma", key: "first_setting"})
- second_db = Config.get_by_params(%{group: "pleroma", key: "second_setting"})
+ first_db = Config.get_by_params(%{group: "pleroma", key: "
:
first_setting"})
+ second_db = Config.get_by_params(%{group: "pleroma", key: "
:
second_setting"})
refute Config.get_by_params(%{group: "pleroma", key: "Pleroma.Repo"})
assert Config.from_binary(first_db.value) == [key: "value", key2: [Pleroma.Repo]]
refute Config.get_by_params(%{group: "pleroma", key: "Pleroma.Repo"})
assert Config.from_binary(first_db.value) == [key: "value", key2: [Pleroma.Repo]]
@@
-41,13
+45,13
@@
defmodule Mix.Tasks.Pleroma.ConfigTest do
test "settings are migrated to file and deleted from db", %{temp_file: temp_file} do
Config.create(%{
group: "pleroma",
test "settings are migrated to file and deleted from db", %{temp_file: temp_file} do
Config.create(%{
group: "pleroma",
- key: "setting_first",
+ key: "
:
setting_first",
value: [key: "value", key2: [Pleroma.Activity]]
})
Config.create(%{
group: "pleroma",
value: [key: "value", key2: [Pleroma.Activity]]
})
Config.create(%{
group: "pleroma",
- key: "setting_second",
+ key: "
:
setting_second",
value: [key: "valu2", key2: [Pleroma.Repo]]
})
value: [key: "valu2", key2: [Pleroma.Repo]]
})
@@
-57,7
+61,7
@@
defmodule Mix.Tasks.Pleroma.ConfigTest do
assert File.exists?(temp_file)
{:ok, file} = File.read(temp_file)
assert File.exists?(temp_file)
{:ok, file} = File.read(temp_file)
- assert file =~ "config :pleroma,
setting_first:
"
- assert file =~ "config :pleroma,
setting_second:
"
+ assert file =~ "config :pleroma,
:setting_first,
"
+ assert file =~ "config :pleroma,
:setting_second,
"
end
end
end
end