logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

loader_test.exs (887B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2022 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. end
  12. test "filter_group/2" do
  13. assert Loader.filter_group(:pleroma,
  14. pleroma: [
  15. {Pleroma.Repo, [a: 1, b: 2]},
  16. {Pleroma.Upload, [a: 1, b: 2]},
  17. {Pleroma.Web.Endpoint, []},
  18. env: :test,
  19. configurable_from_database: true,
  20. database: []
  21. ]
  22. ) == [{Pleroma.Upload, [a: 1, b: 2]}]
  23. end
  24. end