summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/views
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2019-12-03 22:13:38 +0700
committerEgor Kislitsyn <egor@kislitsyn.com>2019-12-03 22:13:38 +0700
commit624e720aa45fd54575d17a2b5e77c67deef6eb86 (patch)
tree68783e20f8bc9cc16837a194de4f15d526a60d61 /test/web/mastodon_api/views
parent7722e5a67a46304f3ae0e37f674a44ca9268be5e (diff)
downloadpleroma-624e720aa45fd54575d17a2b5e77c67deef6eb86.tar.gz
pleroma-624e720aa45fd54575d17a2b5e77c67deef6eb86.zip
Add `with_move` query param to the notifications API
Diffstat (limited to 'test/web/mastodon_api/views')
-rw-r--r--test/web/mastodon_api/views/notification_view_test.exs8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/web/mastodon_api/views/notification_view_test.exs b/test/web/mastodon_api/views/notification_view_test.exs
index 80b6d414c..cd36cb538 100644
--- a/test/web/mastodon_api/views/notification_view_test.exs
+++ b/test/web/mastodon_api/views/notification_view_test.exs
@@ -109,22 +109,22 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do
end
test "Move notification" do
- %{ap_id: old_ap_id} = old_user = insert(:user)
- %{ap_id: _new_ap_id} = new_user = insert(:user, also_known_as: [old_ap_id])
+ old_user = insert(:user)
+ new_user = insert(:user, also_known_as: [old_user.ap_id])
follower = insert(:user)
User.follow(follower, old_user)
Pleroma.Web.ActivityPub.ActivityPub.move(old_user, new_user)
Pleroma.Tests.ObanHelpers.perform_all()
- [notification] = Notification.for_user(follower)
+ [notification] = Notification.for_user(follower, %{with_move: true})
expected = %{
id: to_string(notification.id),
pleroma: %{is_seen: false},
type: "move",
account: AccountView.render("show.json", %{user: old_user, for: follower}),
- target: AccountView.render("show.json", %{user: new_user, for: follower}),
+ target: AccountView.render("show.json", %{user: refresh_record(new_user), for: follower}),
created_at: Utils.to_masto_date(notification.inserted_at)
}