Add ability to follow hashtags (#336)
[akkoma] / test / pleroma / config / holder_test.exs
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Config.HolderTest do
6 use ExUnit.Case, async: true
7
8 alias Pleroma.Config.Holder
9
10 test "default_config/0" do
11 config = Holder.default_config()
12 assert config[:pleroma][Pleroma.Uploaders.Local][:uploads] == "test/uploads"
13
14 refute config[:pleroma][Pleroma.Repo]
15 refute config[:pleroma][Pleroma.Web.Endpoint]
16 refute config[:pleroma][:env]
17 refute config[:pleroma][:configurable_from_database]
18 refute config[:pleroma][:database]
19 refute config[:phoenix][:serve_endpoints]
20 refute config[:tesla][:adapter]
21 end
22
23 test "default_config/1" do
24 pleroma_config = Holder.default_config(:pleroma)
25 assert pleroma_config[Pleroma.Uploaders.Local][:uploads] == "test/uploads"
26 end
27
28 test "default_config/2" do
29 assert Holder.default_config(:pleroma, Pleroma.Uploaders.Local) == [uploads: "test/uploads"]
30 end
31 end