diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-03-18 14:08:21 +0300 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-03-18 14:08:21 +0300 |
commit | f9ecb513faec53758371f6d6efd78668997a1d15 (patch) | |
tree | 879353fbffb02a8b8efbc940c19838cfa7a99d53 /test/web | |
parent | bf474ca3c154544b54720ea23c06191e68f32522 (diff) | |
parent | 69341cbcbac2459faa43bb924577e84dac353982 (diff) | |
download | pleroma-f9ecb513faec53758371f6d6efd78668997a1d15.tar.gz |
Merge branch 'develop' into gun
Diffstat (limited to 'test/web')
-rw-r--r-- | test/web/activity_pub/activity_pub_test.exs | 6 | ||||
-rw-r--r-- | test/web/mastodon_api/controllers/notification_controller_test.exs | 8 | ||||
-rw-r--r-- | test/web/mastodon_api/views/notification_view_test.exs | 2 |
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 0f0a060d2..4f6a88950 100644 --- a/test/web/mastodon_api/controllers/notification_controller_test.exs +++ b/test/web/mastodon_api/controllers/notification_controller_test.exs @@ -408,7 +408,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do end @tag capture_log: true - 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"]) @@ -429,11 +429,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 57e4c8f1e..ac3e12617 100644 --- a/test/web/mastodon_api/views/notification_view_test.exs +++ b/test/web/mastodon_api/views/notification_view_test.exs @@ -133,7 +133,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), |