forked from AkkomaGang/akkoma
Fix tests breaking on config changes
This commit is contained in:
parent
c38f1aefb1
commit
b65aafe1e3
2 changed files with 1 additions and 14 deletions
|
@ -80,24 +80,12 @@ test "it returns text without encode HTML" do
|
|||
|
||||
describe "user_name_string/1" do
|
||||
test "it uses the Endpoint by default" do
|
||||
Pleroma.Web.Endpoint.config_change(
|
||||
[{Pleroma.Web.Endpoint, url: [host: "sub.example.com"]}],
|
||||
[]
|
||||
)
|
||||
|
||||
user = insert(:user)
|
||||
|
||||
assert Utils.user_name_string(user) == "#{user.name} (@#{user.nickname}@sub.example.com)"
|
||||
assert Utils.user_name_string(user) == "#{user.name} (@#{user.nickname}@localhost)"
|
||||
end
|
||||
|
||||
test "it uses any custom WebFinger domain" do
|
||||
Pleroma.Web.Endpoint.config_change(
|
||||
[{Pleroma.Web.Endpoint, url: [host: "sub.example.com"]}],
|
||||
[]
|
||||
)
|
||||
|
||||
clear_config([Pleroma.Web.Endpoint, :url, :host], "sub.example.com")
|
||||
|
||||
clear_config([Pleroma.Web.WebFinger, :domain], "example.com")
|
||||
|
||||
user = insert(:user)
|
||||
|
|
|
@ -8,7 +8,6 @@ defmodule Pleroma.Web.WebFinger.WebFingerControllerTest do
|
|||
import ExUnit.CaptureLog
|
||||
import Pleroma.Factory
|
||||
import Tesla.Mock
|
||||
alias Pleroma.Web.Metadata.Utils
|
||||
|
||||
setup do
|
||||
mock(fn env -> apply(HttpRequestMock, :request, [env]) end)
|
||||
|
|
Loading…
Reference in a new issue