2020-01-21 07:49:22 -07:00
|
|
|
# Pleroma: A lightweight social networking server
|
2021-01-12 23:49:20 -07:00
|
|
|
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
2020-01-21 07:49:22 -07:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
defmodule Pleroma.Config.HolderTest do
|
|
|
|
use ExUnit.Case, async: true
|
|
|
|
|
|
|
|
alias Pleroma.Config.Holder
|
|
|
|
|
2020-03-11 07:25:53 -06:00
|
|
|
test "default_config/0" do
|
|
|
|
config = Holder.default_config()
|
2020-01-21 07:49:22 -07:00
|
|
|
assert config[:pleroma][Pleroma.Uploaders.Local][:uploads] == "test/uploads"
|
|
|
|
|
|
|
|
refute config[:pleroma][Pleroma.Repo]
|
|
|
|
refute config[:pleroma][Pleroma.Web.Endpoint]
|
|
|
|
refute config[:pleroma][:env]
|
|
|
|
refute config[:pleroma][:configurable_from_database]
|
|
|
|
refute config[:pleroma][:database]
|
|
|
|
refute config[:phoenix][:serve_endpoints]
|
2020-07-05 23:48:20 -06:00
|
|
|
refute config[:tesla][:adapter]
|
2020-01-21 07:49:22 -07:00
|
|
|
end
|
|
|
|
|
2020-03-11 07:25:53 -06:00
|
|
|
test "default_config/1" do
|
|
|
|
pleroma_config = Holder.default_config(:pleroma)
|
2020-01-21 07:49:22 -07:00
|
|
|
assert pleroma_config[Pleroma.Uploaders.Local][:uploads] == "test/uploads"
|
|
|
|
end
|
|
|
|
|
2020-03-11 07:25:53 -06:00
|
|
|
test "default_config/2" do
|
|
|
|
assert Holder.default_config(:pleroma, Pleroma.Uploaders.Local) == [uploads: "test/uploads"]
|
2020-01-21 07:49:22 -07:00
|
|
|
end
|
|
|
|
end
|