diff options
| author | Ariadne Conill <ariadne@dereferenced.org> | 2019-10-18 00:51:53 +0000 |
|---|---|---|
| committer | Ariadne Conill <ariadne@dereferenced.org> | 2019-10-18 14:50:09 +0000 |
| commit | af9aa8e35809561a3edbd79ed1adb7de31056f38 (patch) | |
| tree | 15bebb02a379b8505d001686981439ad651bfede /test/object/fetcher_test.exs | |
| parent | 597cb8897b64ba8353ccc045addb4672b97ab18f (diff) | |
| download | pleroma-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.exs | 21 |
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 |
