diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-04-01 20:08:14 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-04-01 20:08:14 +0300 |
commit | 98b96e45ababecb7554232787968f2f326f24e54 (patch) | |
tree | 66e907ccc1acd2c667b57f5b5d0a8db34cbd288c /test/web/mastodon_api/controllers/notification_controller_test.exs | |
parent | 2f2bd7fe72f474b7177c751a2dc3af716622ba91 (diff) | |
parent | ef7d2b0f11a9bf74e982b73ae4cec632f93fbebc (diff) | |
download | pleroma-98b96e45ababecb7554232787968f2f326f24e54.tar.gz pleroma-98b96e45ababecb7554232787968f2f326f24e54.zip |
Merge remote-tracking branch 'remotes/origin/develop' into output-of-relationships-in-statuses
# Conflicts:
# CHANGELOG.md
Diffstat (limited to 'test/web/mastodon_api/controllers/notification_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/controllers/notification_controller_test.exs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/web/mastodon_api/controllers/notification_controller_test.exs b/test/web/mastodon_api/controllers/notification_controller_test.exs index 42a311f99..e24f7923e 100644 --- a/test/web/mastodon_api/controllers/notification_controller_test.exs +++ b/test/web/mastodon_api/controllers/notification_controller_test.exs @@ -472,11 +472,24 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do assert length(json_response(conn, 200)) == 1 end + @tag capture_log: true test "see move notifications" do old_user = insert(:user) new_user = insert(:user, also_known_as: [old_user.ap_id]) %{user: follower, conn: conn} = oauth_access(["read:notifications"]) + old_user_url = old_user.ap_id + + body = + File.read!("test/fixtures/users_mock/localhost.json") + |> String.replace("{{nickname}}", old_user.nickname) + |> Jason.encode!() + + Tesla.Mock.mock(fn + %{method: :get, url: ^old_user_url} -> + %Tesla.Env{status: 200, body: body} + end) + User.follow(follower, old_user) Pleroma.Web.ActivityPub.ActivityPub.move(old_user, new_user) Pleroma.Tests.ObanHelpers.perform_all() |