aboutsummaryrefslogtreecommitdiff
path: root/test/web
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-03-18 10:12:50 +0000
committerrinpatch <rinpatch@sdf.org>2020-03-18 10:12:50 +0000
commit69341cbcbac2459faa43bb924577e84dac353982 (patch)
treee60c796ea7a1746ce63042a37b631a7a397b40d1 /test/web
parente4380afc18a8c9af5aff986b0f5f6e422714d1c1 (diff)
parentf3791add99014c4e5f1c51c06f8ace84b254cec2 (diff)
downloadpleroma-69341cbcbac2459faa43bb924577e84dac353982.tar.gz
Merge branch 'feature/1530-removing-with_move' into 'develop'
Feature/1530 removing with move Closes #1530 See merge request pleroma/pleroma!2306
Diffstat (limited to 'test/web')
-rw-r--r--test/web/activity_pub/activity_pub_test.exs6
-rw-r--r--test/web/mastodon_api/controllers/notification_controller_test.exs8
-rw-r--r--test/web/mastodon_api/views/notification_view_test.exs2
3 files changed, 5 insertions, 11 deletions
diff --git a/test/web/activity_pub/activity_pub_test.exs b/test/web/activity_pub/activity_pub_test.exs
index 3dd3dd04d..d86c8260e 100644
--- a/test/web/activity_pub/activity_pub_test.exs
+++ b/test/web/activity_pub/activity_pub_test.exs
@@ -1955,11 +1955,9 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
activity = %Activity{activity | object: nil}
- assert [%Notification{activity: ^activity}] =
- Notification.for_user(follower, %{with_move: true})
+ assert [%Notification{activity: ^activity}] = Notification.for_user(follower)
- assert [%Notification{activity: ^activity}] =
- Notification.for_user(follower_move_opted_out, %{with_move: true})
+ assert [%Notification{activity: ^activity}] = Notification.for_user(follower_move_opted_out)
end
test "old user must be in the new user's `also_known_as` list" do
diff --git a/test/web/mastodon_api/controllers/notification_controller_test.exs b/test/web/mastodon_api/controllers/notification_controller_test.exs
index d452ddbdd..dbe9a7fd7 100644
--- a/test/web/mastodon_api/controllers/notification_controller_test.exs
+++ b/test/web/mastodon_api/controllers/notification_controller_test.exs
@@ -407,7 +407,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
assert length(json_response(conn, 200)) == 1
end
- test "see move notifications with `with_move` parameter" do
+ 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"])
@@ -416,11 +416,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
Pleroma.Web.ActivityPub.ActivityPub.move(old_user, new_user)
Pleroma.Tests.ObanHelpers.perform_all()
- ret_conn = get(conn, "/api/v1/notifications")
-
- assert json_response(ret_conn, 200) == []
-
- conn = get(conn, "/api/v1/notifications", %{"with_move" => "true"})
+ conn = get(conn, "/api/v1/notifications")
assert length(json_response(conn, 200)) == 1
end
diff --git a/test/web/mastodon_api/views/notification_view_test.exs b/test/web/mastodon_api/views/notification_view_test.exs
index 4df9c3c03..d04c3022f 100644
--- a/test/web/mastodon_api/views/notification_view_test.exs
+++ b/test/web/mastodon_api/views/notification_view_test.exs
@@ -120,7 +120,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do
old_user = refresh_record(old_user)
new_user = refresh_record(new_user)
- [notification] = Notification.for_user(follower, %{with_move: true})
+ [notification] = Notification.for_user(follower)
expected = %{
id: to_string(notification.id),