summaryrefslogtreecommitdiff
path: root/test/object/fetcher_test.exs
diff options
context:
space:
mode:
authorAriadne Conill <ariadne@dereferenced.org>2019-10-18 00:51:53 +0000
committerAriadne Conill <ariadne@dereferenced.org>2019-10-18 14:50:09 +0000
commitaf9aa8e35809561a3edbd79ed1adb7de31056f38 (patch)
tree15bebb02a379b8505d001686981439ad651bfede /test/object/fetcher_test.exs
parent597cb8897b64ba8353ccc045addb4672b97ab18f (diff)
downloadpleroma-af9aa8e35809561a3edbd79ed1adb7de31056f38.tar.gz
pleroma-af9aa8e35809561a3edbd79ed1adb7de31056f38.zip
tests: simplify object fetching and containment tests
Diffstat (limited to 'test/object/fetcher_test.exs')
-rw-r--r--test/object/fetcher_test.exs21
1 files changed, 3 insertions, 18 deletions
diff --git a/test/object/fetcher_test.exs b/test/object/fetcher_test.exs
index 851a503a7..9ae6b015d 100644
--- a/test/object/fetcher_test.exs
+++ b/test/object/fetcher_test.exs
@@ -27,31 +27,16 @@ defmodule Pleroma.Object.FetcherTest do
end
describe "actor origin containment" do
- test_with_mock "it rejects objects with a bogus origin",
- Pleroma.Web.OStatus,
- [:passthrough],
- [] do
+ test "it rejects objects with a bogus origin" do
{:error, _} = Fetcher.fetch_object_from_id("https://info.pleroma.site/activity.json")
-
- refute called(Pleroma.Web.OStatus.fetch_activity_from_url(:_))
end
- test_with_mock "it rejects objects when attributedTo is wrong (variant 1)",
- Pleroma.Web.OStatus,
- [:passthrough],
- [] do
+ test "it rejects objects when attributedTo is wrong (variant 1)" do
{:error, _} = Fetcher.fetch_object_from_id("https://info.pleroma.site/activity2.json")
-
- refute called(Pleroma.Web.OStatus.fetch_activity_from_url(:_))
end
- test_with_mock "it rejects objects when attributedTo is wrong (variant 2)",
- Pleroma.Web.OStatus,
- [:passthrough],
- [] do
+ test "it rejects objects when attributedTo is wrong (variant 2)" do
{:error, _} = Fetcher.fetch_object_from_id("https://info.pleroma.site/activity3.json")
-
- refute called(Pleroma.Web.OStatus.fetch_activity_from_url(:_))
end
end