Remove call to Pleroma.Web.Endpoint.config_change/2
This is not necessary for the tests to pass and breaks other tests as this change doesn't get cleanly reverted causing the hostname to stay set this way and leak into other test causing failures with "sub.example.com" not matching "localhost"
This commit is contained in:
parent
36b3867787
commit
d4dd21303a
|
@ -55,12 +55,7 @@ test "Webfinger JRD" do
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
test "reach user on tld, while pleroma is running on subdomain" do
|
test "reach user on tld, while pleroma is runned on subdomain" 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.Endpoint, :url, :host], "sub.example.com")
|
||||||
|
|
||||||
clear_config([Pleroma.Web.WebFinger, :domain], "example.com")
|
clear_config([Pleroma.Web.WebFinger, :domain], "example.com")
|
||||||
|
@ -75,13 +70,6 @@ test "reach user on tld, while pleroma is running on subdomain" do
|
||||||
|
|
||||||
assert response["subject"] == "acct:#{user.nickname}@example.com"
|
assert response["subject"] == "acct:#{user.nickname}@example.com"
|
||||||
assert response["aliases"] == ["https://sub.example.com/users/#{user.nickname}"]
|
assert response["aliases"] == ["https://sub.example.com/users/#{user.nickname}"]
|
||||||
|
|
||||||
on_exit(fn ->
|
|
||||||
Pleroma.Web.Endpoint.config_change(
|
|
||||||
[{Pleroma.Web.Endpoint, url: [host: "localhost"]}],
|
|
||||||
[]
|
|
||||||
)
|
|
||||||
end)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
test "it returns 404 when user isn't found (JSON)" do
|
test "it returns 404 when user isn't found (JSON)" do
|
||||||
|
|
Loading…
Reference in New Issue