diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-10 14:18:57 +0400 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-10 14:18:57 +0400 |
commit | cf2a0574e77ed207453215ae83377a3eb8f2fa0c (patch) | |
tree | fdc89909325238b71c8fc07a63d8720e432434c4 /test/web/common_api/common_api_utils_test.exs | |
parent | 4a2538967caf5b0f9970cc5f973c16ea5d776aa3 (diff) | |
parent | ce089615e1e89fbb63b0c0548906f3b6c22abac2 (diff) | |
download | pleroma-cf2a0574e77ed207453215ae83377a3eb8f2fa0c.tar.gz pleroma-cf2a0574e77ed207453215ae83377a3eb8f2fa0c.zip |
Merge branch 'develop' into fix/support-conversations-pagination
Diffstat (limited to 'test/web/common_api/common_api_utils_test.exs')
-rw-r--r-- | test/web/common_api/common_api_utils_test.exs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/web/common_api/common_api_utils_test.exs b/test/web/common_api/common_api_utils_test.exs index 45fc94522..98cf02d49 100644 --- a/test/web/common_api/common_api_utils_test.exs +++ b/test/web/common_api/common_api_utils_test.exs @@ -159,11 +159,11 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do {output, _, _} = Utils.format_input(text, "text/markdown") assert output == - ~s(<p><strong>hello world</strong></p><p><em>another <span class="h-card"><a data-user="#{ + ~s(<p><strong>hello world</strong></p><p><em>another <span class="h-card"><a class="u-url mention" data-user="#{ user.id - }" class="u-url mention" href="http://foo.com/user__test" rel="ugc">@<span>user__test</span></a></span> and <span class="h-card"><a data-user="#{ + }" href="http://foo.com/user__test" rel="ugc">@<span>user__test</span></a></span> and <span class="h-card"><a class="u-url mention" data-user="#{ user.id - }" class="u-url mention" href="http://foo.com/user__test" rel="ugc">@<span>user__test</span></a></span> <a href="http://google.com" rel="ugc">google.com</a> paragraph</em></p>) + }" href="http://foo.com/user__test" rel="ugc">@<span>user__test</span></a></span> <a href="http://google.com" rel="ugc">google.com</a> paragraph</em></p>) end end @@ -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" ] |