1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Config.HolderTest do
6 use ExUnit.Case, async: true
8 alias Pleroma.Config.Holder
11 config = Holder.config()
12 assert config[:pleroma][Pleroma.Uploaders.Local][:uploads] == "test/uploads"
13 assert config[:tesla][:adapter] == Tesla.Mock
15 refute config[:pleroma][Pleroma.Repo]
16 refute config[:pleroma][Pleroma.Web.Endpoint]
17 refute config[:pleroma][:env]
18 refute config[:pleroma][:configurable_from_database]
19 refute config[:pleroma][:database]
20 refute config[:phoenix][:serve_endpoints]
24 pleroma_config = Holder.config(:pleroma)
25 assert pleroma_config[Pleroma.Uploaders.Local][:uploads] == "test/uploads"
26 tesla_config = Holder.config(:tesla)
27 assert tesla_config[:adapter] == Tesla.Mock
31 assert Holder.config(:pleroma, Pleroma.Uploaders.Local) == [uploads: "test/uploads"]
32 assert Holder.config(:tesla, :adapter) == Tesla.Mock