logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma

loader_test.exs (930B)


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