summaryrefslogtreecommitdiff
path: root/test/http/request_builder_test.exs
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2019-12-05 12:22:19 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2019-12-05 12:22:19 +0300
commit49bb0a130f93476d32d3177d7a989b7a98a063f2 (patch)
tree6e64e2bbe2644dd607ec685de5b2bf94c1f9326c /test/http/request_builder_test.exs
parentb9041c209787dc279d4dc5194d65dff73684cdb9 (diff)
parent228bf4d214abe3bb62c52128d3bc145e396b174d (diff)
downloadpleroma-49bb0a130f93476d32d3177d7a989b7a98a063f2.tar.gz
pleroma-49bb0a130f93476d32d3177d7a989b7a98a063f2.zip
Merge branch 'develop' into issue/1276
Diffstat (limited to 'test/http/request_builder_test.exs')
-rw-r--r--test/http/request_builder_test.exs10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/http/request_builder_test.exs b/test/http/request_builder_test.exs
index 170ca916f..80ef25d7b 100644
--- a/test/http/request_builder_test.exs
+++ b/test/http/request_builder_test.exs
@@ -16,11 +16,21 @@ defmodule Pleroma.HTTP.RequestBuilderTest do
test "send pleroma user agent" do
Pleroma.Config.put([:http, :send_user_agent], true)
+ Pleroma.Config.put([:http, :user_agent], :default)
assert RequestBuilder.headers(%{}, []) == %{
headers: [{"User-Agent", Pleroma.Application.user_agent()}]
}
end
+
+ test "send custom user agent" do
+ Pleroma.Config.put([:http, :send_user_agent], true)
+ Pleroma.Config.put([:http, :user_agent], "totally-not-pleroma")
+
+ assert RequestBuilder.headers(%{}, []) == %{
+ headers: [{"User-Agent", "totally-not-pleroma"}]
+ }
+ end
end
describe "add_optional_params/3" do