updating clear_config
This commit is contained in:
parent
9bae9b1b1b
commit
7f9b5284fa
@ -28,9 +28,7 @@ defmodule Pleroma.HTTP.AdapterHelper.GunTest do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe "options/1" do
|
describe "options/1" do
|
||||||
clear_config([:http, :adapter]) do
|
setup do: clear_config([:http, :adapter], a: 1, b: 2)
|
||||||
Config.put([:http, :adapter], a: 1, b: 2)
|
|
||||||
end
|
|
||||||
|
|
||||||
test "https url with default port" do
|
test "https url with default port" do
|
||||||
uri = URI.parse("https://example.com")
|
uri = URI.parse("https://example.com")
|
||||||
|
@ -6,7 +6,6 @@ defmodule Pleroma.HTTP.AdapterHelper.HackneyTest do
|
|||||||
use ExUnit.Case, async: true
|
use ExUnit.Case, async: true
|
||||||
use Pleroma.Tests.Helpers
|
use Pleroma.Tests.Helpers
|
||||||
|
|
||||||
alias Pleroma.Config
|
|
||||||
alias Pleroma.HTTP.AdapterHelper.Hackney
|
alias Pleroma.HTTP.AdapterHelper.Hackney
|
||||||
|
|
||||||
setup_all do
|
setup_all do
|
||||||
@ -15,9 +14,7 @@ defmodule Pleroma.HTTP.AdapterHelper.HackneyTest do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe "options/2" do
|
describe "options/2" do
|
||||||
clear_config([:http, :adapter]) do
|
setup do: clear_config([:http, :adapter], a: 1, b: 2)
|
||||||
Config.put([:http, :adapter], a: 1, b: 2)
|
|
||||||
end
|
|
||||||
|
|
||||||
test "add proxy and opts from config", %{uri: uri} do
|
test "add proxy and opts from config", %{uri: uri} do
|
||||||
opts = Hackney.options([proxy: "localhost:8123"], uri)
|
opts = Hackney.options([proxy: "localhost:8123"], uri)
|
||||||
|
@ -82,7 +82,7 @@ defmodule Pleroma.HTTP.ConnectionTest do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe "options/3" do
|
describe "options/3" do
|
||||||
clear_config([:http, :proxy_url])
|
setup do: clear_config([:http, :proxy_url])
|
||||||
|
|
||||||
test "without proxy_url in config" do
|
test "without proxy_url in config" do
|
||||||
Config.delete([:http, :proxy_url])
|
Config.delete([:http, :proxy_url])
|
||||||
|
Loading…
Reference in New Issue
Block a user