summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/account_controller_test.exs
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@pm.me>2020-05-09 11:31:34 +0300
committerRoman Chvanikov <chvanikoff@pm.me>2020-05-09 11:31:34 +0300
commit942093683a1e6b3f3d3692268b2af8390da6d325 (patch)
tree3ad22c9d4d06716f469925b7c15a30e9f0e25c57 /test/web/mastodon_api/controllers/account_controller_test.exs
parentcbe383ae832f13d5d2a20ee8fb5e85498205fbc3 (diff)
parentc962c6afb3b30eb6d42c2a5548898b3713492169 (diff)
downloadpleroma-942093683a1e6b3f3d3692268b2af8390da6d325.tar.gz
pleroma-942093683a1e6b3f3d3692268b2af8390da6d325.zip
Merge branch 'develop' into feature/admin-api-status-count-per-instance
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