logo

pleroma

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

holder_test.exs (1024B)


  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.HolderTest do
  5. use ExUnit.Case, async: true
  6. alias Pleroma.Config.Holder
  7. test "default_config/0" do
  8. config = Holder.default_config()
  9. assert config[:pleroma][Pleroma.Uploaders.Local][:uploads] == "test/uploads"
  10. refute config[:pleroma][Pleroma.Repo]
  11. refute config[:pleroma][Pleroma.Web.Endpoint]
  12. refute config[:pleroma][:env]
  13. refute config[:pleroma][:configurable_from_database]
  14. refute config[:pleroma][:database]
  15. refute config[:phoenix][:serve_endpoints]
  16. refute config[:tesla][:adapter]
  17. end
  18. test "default_config/1" do
  19. pleroma_config = Holder.default_config(:pleroma)
  20. assert pleroma_config[Pleroma.Uploaders.Local][:uploads] == "test/uploads"
  21. end
  22. test "default_config/2" do
  23. assert Holder.default_config(:pleroma, Pleroma.Uploaders.Local) == [uploads: "test/uploads"]
  24. end
  25. end