1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Config.LoaderTest do
6 use ExUnit.Case, async: true
8 alias Pleroma.Config.Loader
11 config = Loader.read("test/fixtures/config/temp.secret.exs")
12 assert config[:pleroma][:first_setting][:key] == "value"
13 assert config[:pleroma][:first_setting][:key2] == [Pleroma.Repo]
14 assert config[:quack][:level] == :info
17 test "filter_group/2" do
18 assert Loader.filter_group(:pleroma,
20 {Pleroma.Repo, [a: 1, b: 2]},
21 {Pleroma.Upload, [a: 1, b: 2]},
22 {Pleroma.Web.Endpoint, []},
24 configurable_from_database: true,
27 ) == [{Pleroma.Upload, [a: 1, b: 2]}]