AccountView: settings -> settings_store
This commit is contained in:
parent
eb2963bc43
commit
aaad85c4d9
|
@ -157,7 +157,7 @@ defp maybe_put_settings_store(data, %User{info: info, id: id}, %User{id: id}, %{
|
||||||
with_pleroma_settings: true
|
with_pleroma_settings: true
|
||||||
}) do
|
}) do
|
||||||
data
|
data
|
||||||
|> Kernel.put_in([:pleroma, :settings], info.pleroma_settings_store)
|
|> Kernel.put_in([:pleroma, :settings_store], info.pleroma_settings_store)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp maybe_put_settings_store(data, _, _, _), do: data
|
defp maybe_put_settings_store(data, _, _, _), do: data
|
||||||
|
|
|
@ -246,12 +246,12 @@ test "returns the settings store if the requesting user is the represented user
|
||||||
result =
|
result =
|
||||||
AccountView.render("account.json", %{user: user, for: user, with_pleroma_settings: true})
|
AccountView.render("account.json", %{user: user, for: user, with_pleroma_settings: true})
|
||||||
|
|
||||||
assert result.pleroma.settings == %{:fe => "test"}
|
assert result.pleroma.settings_store == %{:fe => "test"}
|
||||||
|
|
||||||
result = AccountView.render("account.json", %{user: user, with_pleroma_settings: true})
|
result = AccountView.render("account.json", %{user: user, with_pleroma_settings: true})
|
||||||
assert result.pleroma[:settings] == nil
|
assert result.pleroma[:settings_store] == nil
|
||||||
|
|
||||||
result = AccountView.render("account.json", %{user: user, for: user})
|
result = AccountView.render("account.json", %{user: user, for: user})
|
||||||
assert result.pleroma[:settings] == nil
|
assert result.pleroma[:settings_store] == nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue