aboutsummaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/account_controller_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-05-08 13:13:37 +0200
committerlain <lain@soykaf.club>2020-05-08 13:13:37 +0200
commit7637ef42033b2da79ca61e9dee8fb4187d1a8257 (patch)
tree9b42481388e596d5b5c24a8e3fd22fcdcd69bb46 /test/web/mastodon_api/controllers/account_controller_test.exs
parentfb2d284d2897e8b789da4f81ae8d288373d2bf76 (diff)
parentfbcc53760e6fcd393513c05a5bd7a4a6a6f3b731 (diff)
downloadpleroma-7637ef42033b2da79ca61e9dee8fb4187d1a8257.tar.gz
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
Diffstat (limited to 'test/web/mastodon_api/controllers/account_controller_test.exs')
-rw-r--r--test/web/mastodon_api/controllers/account_controller_test.exs3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/web/mastodon_api/controllers/account_controller_test.exs b/test/web/mastodon_api/controllers/account_controller_test.exs
index b9da7e924..256a8b304 100644
--- a/test/web/mastodon_api/controllers/account_controller_test.exs
+++ b/test/web/mastodon_api/controllers/account_controller_test.exs
@@ -1196,12 +1196,15 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
describe "verify_credentials" do
test "verify_credentials" do
%{user: user, conn: conn} = oauth_access(["read:accounts"])
+ [notification | _] = insert_list(7, :notification, user: user)
+ Pleroma.Notification.set_read_up_to(user, notification.id)
conn = get(conn, "/api/v1/accounts/verify_credentials")
response = json_response_and_validate_schema(conn, 200)
assert %{"id" => id, "source" => %{"privacy" => "public"}} = response
assert response["pleroma"]["chat_token"]
+ assert response["pleroma"]["unread_notifications_count"] == 6
assert id == to_string(user.id)
end