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.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]
16 test "filter_group/2" do
17 assert Loader.filter_group(:pleroma,
19 {Pleroma.Repo, [a: 1, b: 2]},
20 {Pleroma.Upload, [a: 1, b: 2]},
21 {Pleroma.Web.Endpoint, []},
23 configurable_from_database: true,
26 ) == [{Pleroma.Upload, [a: 1, b: 2]}]