diff options
author | Alex Gleason <alex@alexgleason.me> | 2021-06-08 14:04:46 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2021-06-08 14:17:57 -0500 |
commit | d369142a8e11b02066b734ef8900b27d7cd52bad (patch) | |
tree | e3224d2e4e4c6969a4c9e7046a6397553791a5ad /test/pleroma | |
parent | bed10ab2c70848756740f251c1d54bdca02dd093 (diff) | |
download | pleroma-cycles-context.tar.gz |
Introduce Pleroma.Config.url/0 to bypass compile-time deps on Endpointcycles-context
Diffstat (limited to 'test/pleroma')
-rw-r--r-- | test/pleroma/config_test.exs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/pleroma/config_test.exs b/test/pleroma/config_test.exs index 3158a2ec8..2a1bad84d 100644 --- a/test/pleroma/config_test.exs +++ b/test/pleroma/config_test.exs @@ -136,4 +136,26 @@ defmodule Pleroma.ConfigTest do Pleroma.Config.delete([:lorem]) Pleroma.Config.delete([:ipsum]) end + + describe "URI functions" do + setup do + url = [host: "lain.com", scheme: "https", port: 443] + clear_config([Pleroma.Web.Endpoint, :url], url) + end + + test "uri/0" do + expected = %URI{ + scheme: "https", + host: "lain.com", + port: 443 + } + + assert Pleroma.Config.uri() == expected + end + + test "url/0" do + expected = "https://lain.com" + assert Pleroma.Config.url() == expected + end + end end |