diff options
| author | Maksim <parallel588@gmail.com> | 2019-08-19 15:34:29 +0000 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2019-08-19 15:34:29 +0000 |
| commit | a320358703db249ab20df5afd81c92fb42b8cadb (patch) | |
| tree | d46f6d2447183492d75983986ae2d57b75fdcb0b /test/object | |
| parent | 49ae3191df2a7acfa741e93d6f5142f9cf27dc06 (diff) | |
| download | pleroma-a320358703db249ab20df5afd81c92fb42b8cadb.tar.gz pleroma-a320358703db249ab20df5afd81c92fb42b8cadb.zip | |
added test helpers to clear config after tests
Diffstat (limited to 'test/object')
| -rw-r--r-- | test/object/fetcher_test.exs | 8 |
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 |
