diff options
| author | lain <lain@soykaf.club> | 2020-04-06 17:50:31 +0200 | 
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-04-06 17:50:31 +0200 | 
| commit | 19335be24c25739e2334180af6c59dd8919d5fc8 (patch) | |
| tree | db34531b2dd5befb495d4379aa8aaad9284fa72c /test/web/common_api | |
| parent | fd97b0e634d30dec3217efcf3d67610d1b54bf8b (diff) | |
| parent | 1d4ab06505ec5143dbb1d78d718fa9efd1497751 (diff) | |
| download | pleroma-19335be24c25739e2334180af6c59dd8919d5fc8.tar.gz pleroma-19335be24c25739e2334180af6c59dd8919d5fc8.zip | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
Diffstat (limited to 'test/web/common_api')
| -rw-r--r-- | test/web/common_api/common_api_test.exs | 6 | ||||
| -rw-r--r-- | test/web/common_api/common_api_utils_test.exs | 7 | 
2 files changed, 10 insertions, 3 deletions
| diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs index c2ed1c789..f46ad0272 100644 --- a/test/web/common_api/common_api_test.exs +++ b/test/web/common_api/common_api_test.exs @@ -17,9 +17,9 @@ defmodule Pleroma.Web.CommonAPITest do    require Pleroma.Constants -  clear_config([:instance, :safe_dm_mentions]) -  clear_config([:instance, :limit]) -  clear_config([:instance, :max_pinned_statuses]) +  setup do: clear_config([:instance, :safe_dm_mentions]) +  setup do: clear_config([:instance, :limit]) +  setup do: clear_config([:instance, :max_pinned_statuses])    test "when replying to a conversation / participation, it will set the correct context id even if no explicit reply_to is given" do      user = insert(:user) diff --git a/test/web/common_api/common_api_utils_test.exs b/test/web/common_api/common_api_utils_test.exs index 45fc94522..d383d1714 100644 --- a/test/web/common_api/common_api_utils_test.exs +++ b/test/web/common_api/common_api_utils_test.exs @@ -472,6 +472,13 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do        activity = insert(:note_activity, user: user, note: object)        Pleroma.Repo.delete(object) +      obj_url = activity.data["object"] + +      Tesla.Mock.mock(fn +        %{method: :get, url: ^obj_url} -> +          %Tesla.Env{status: 404, body: ""} +      end) +        assert Utils.maybe_notify_mentioned_recipients(["test-test"], activity) == [                 "test-test"               ] | 
