summaryrefslogtreecommitdiff
path: root/test/object
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-08-19 17:00:59 +0000
committerlain <lain@soykaf.club>2019-08-19 17:00:59 +0000
commitd2c9befc64d4b8d4f56b5e23afeb1b720767e7ff (patch)
treecd76bb5d4cf7716624378a9cbf9cd42a63eee735 /test/object
parentcb222b72b39ae4dc887657d1eae03d0360cbd429 (diff)
parente5d2c0c66949ad90f9ee02874bdea2aa94f7f683 (diff)
downloadpleroma-d2c9befc64d4b8d4f56b5e23afeb1b720767e7ff.tar.gz
pleroma-d2c9befc64d4b8d4f56b5e23afeb1b720767e7ff.zip
Merge branch 'develop' into 'fix/reverse-proxy-body-too-large'
# Conflicts: # CHANGELOG.md
Diffstat (limited to 'test/object')
-rw-r--r--test/object/fetcher_test.exs8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/object/fetcher_test.exs b/test/object/fetcher_test.exs
index 0ca87f035..895a73d2c 100644
--- a/test/object/fetcher_test.exs
+++ b/test/object/fetcher_test.exs
@@ -159,32 +159,28 @@ defmodule Pleroma.Object.FetcherTest do
end
describe "signed fetches" do
+ clear_config([:activitypub, :sign_object_fetches])
+
test_with_mock "it signs fetches when configured to do so",
Pleroma.Signature,
[:passthrough],
[] do
- option = Pleroma.Config.get([:activitypub, :sign_object_fetches])
Pleroma.Config.put([:activitypub, :sign_object_fetches], true)
Fetcher.fetch_object_from_id("http://mastodon.example.org/@admin/99541947525187367")
assert called(Pleroma.Signature.sign(:_, :_))
-
- Pleroma.Config.put([:activitypub, :sign_object_fetches], option)
end
test_with_mock "it doesn't sign fetches when not configured to do so",
Pleroma.Signature,
[:passthrough],
[] do
- option = Pleroma.Config.get([:activitypub, :sign_object_fetches])
Pleroma.Config.put([:activitypub, :sign_object_fetches], false)
Fetcher.fetch_object_from_id("http://mastodon.example.org/@admin/99541947525187367")
refute called(Pleroma.Signature.sign(:_, :_))
-
- Pleroma.Config.put([:activitypub, :sign_object_fetches], option)
end
end
end