1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 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
10 test "default_config/0" do
11 config = Holder.default_config()
12 assert config[:pleroma][Pleroma.Uploaders.Local][:uploads] == "test/uploads"
14 refute config[:pleroma][Pleroma.Repo]
15 refute config[:pleroma][Pleroma.Web.Endpoint]
16 refute config[:pleroma][:env]
17 refute config[:pleroma][:configurable_from_database]
18 refute config[:pleroma][:database]
19 refute config[:phoenix][:serve_endpoints]
20 refute config[:tesla][:adapter]
23 test "default_config/1" do
24 pleroma_config = Holder.default_config(:pleroma)
25 assert pleroma_config[Pleroma.Uploaders.Local][:uploads] == "test/uploads"
28 test "default_config/2" do
29 assert Holder.default_config(:pleroma, Pleroma.Uploaders.Local) == [uploads: "test/uploads"]