projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removing with_move parameter
[akkoma]
/
test
/
web
/
mastodon_api
/
controllers
/
notification_controller_test.exs
diff --git
a/test/web/mastodon_api/controllers/notification_controller_test.exs
b/test/web/mastodon_api/controllers/notification_controller_test.exs
index 38161982a7b4ed5932980aed3bafed3cb325fae1..dbe9a7fd7bf302beaeebc82bc87fc6459534318e 100644
(file)
--- a/
test/web/mastodon_api/controllers/notification_controller_test.exs
+++ b/
test/web/mastodon_api/controllers/notification_controller_test.exs
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
@@
-407,7
+407,7
@@
defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
assert length(json_response(conn, 200)) == 1
end
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"])
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()
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
assert length(json_response(conn, 200)) == 1
end
@@
-458,8
+454,9
@@
defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
end
describe "from specified user" do
end
describe "from specified user" do
- test "account_id", %{conn: conn} do
- user = insert(:user)
+ test "account_id" do
+ %{user: user, conn: conn} = oauth_access(["read:notifications"])
+
%{id: account_id} = other_user1 = insert(:user)
other_user2 = insert(:user)
%{id: account_id} = other_user1 = insert(:user)
other_user2 = insert(:user)