diff options
| author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-08-22 20:59:58 +0300 |
|---|---|---|
| committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-08-22 20:59:58 +0300 |
| commit | 256ff09aa8068166a9f83e3159f060fd4598af76 (patch) | |
| tree | a5e5efa83241f28d8d241b9d2d95ca4ceaefd286 /test/http | |
| parent | 8778c16dac1789eeb6dd51524573163216200b5d (diff) | |
| parent | 73884441f31092bdb2f509950daf9bd3889a9a8b (diff) | |
| download | pleroma-256ff09aa8068166a9f83e3159f060fd4598af76.tar.gz pleroma-256ff09aa8068166a9f83e3159f060fd4598af76.zip | |
[#1149] Merge remote-tracking branch 'remotes/upstream/develop' into 1149-oban-job-queue
# Conflicts:
# lib/pleroma/application.ex
# lib/pleroma/scheduled_activity_worker.ex
# lib/pleroma/web/federator/retry_queue.ex
# lib/pleroma/web/oauth/token/clean_worker.ex
# test/user_test.exs
# test/web/federator_test.exs
Diffstat (limited to 'test/http')
| -rw-r--r-- | test/http/request_builder_test.exs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/http/request_builder_test.exs b/test/http/request_builder_test.exs index 7febe84c5..170ca916f 100644 --- a/test/http/request_builder_test.exs +++ b/test/http/request_builder_test.exs @@ -4,21 +4,19 @@ defmodule Pleroma.HTTP.RequestBuilderTest do use ExUnit.Case, async: true + use Pleroma.Tests.Helpers alias Pleroma.HTTP.RequestBuilder describe "headers/2" do + clear_config([:http, :send_user_agent]) + test "don't send pleroma user agent" do assert RequestBuilder.headers(%{}, []) == %{headers: []} end test "send pleroma user agent" do - send = Pleroma.Config.get([:http, :send_user_agent]) Pleroma.Config.put([:http, :send_user_agent], true) - on_exit(fn -> - Pleroma.Config.put([:http, :send_user_agent], send) - end) - assert RequestBuilder.headers(%{}, []) == %{ headers: [{"User-Agent", Pleroma.Application.user_agent()}] } |
