diff options
author | lain <lain@soykaf.club> | 2020-05-08 09:23:01 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-05-08 09:23:01 +0000 |
commit | 0cf43391f272b2bb756b564e12bbcd3efda6a4bd (patch) | |
tree | 3ce1732a3a997de5070e005f9b4102a5c01c878c /test/web/mastodon_api/controllers/marker_controller_test.exs | |
parent | 218a22c9a36ff2f8de353110f0badfc1ec5aa0f2 (diff) | |
parent | a081135365c2b9d7bc81ee84baffbc3c2be68e8c (diff) | |
download | pleroma-0cf43391f272b2bb756b564e12bbcd3efda6a4bd.tar.gz pleroma-0cf43391f272b2bb756b564e12bbcd3efda6a4bd.zip |
Merge branch 'issue/1276-2' into 'develop'
[#1276] added an endpoint for getting unread notification count
See merge request pleroma/pleroma!2392
Diffstat (limited to 'test/web/mastodon_api/controllers/marker_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/controllers/marker_controller_test.exs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/web/mastodon_api/controllers/marker_controller_test.exs b/test/web/mastodon_api/controllers/marker_controller_test.exs index bce719bea..6dd40fb4a 100644 --- a/test/web/mastodon_api/controllers/marker_controller_test.exs +++ b/test/web/mastodon_api/controllers/marker_controller_test.exs @@ -11,6 +11,7 @@ defmodule Pleroma.Web.MastodonAPI.MarkerControllerTest do test "gets markers with correct scopes", %{conn: conn} do user = insert(:user) token = insert(:oauth_token, user: user, scopes: ["read:statuses"]) + insert_list(7, :notification, user: user) {:ok, %{"notifications" => marker}} = Pleroma.Marker.upsert( @@ -29,7 +30,8 @@ defmodule Pleroma.Web.MastodonAPI.MarkerControllerTest do "notifications" => %{ "last_read_id" => "69420", "updated_at" => NaiveDateTime.to_iso8601(marker.updated_at), - "version" => 0 + "version" => 0, + "pleroma" => %{"unread_count" => 7} } } end @@ -71,7 +73,8 @@ defmodule Pleroma.Web.MastodonAPI.MarkerControllerTest do "notifications" => %{ "last_read_id" => "69420", "updated_at" => _, - "version" => 0 + "version" => 0, + "pleroma" => %{"unread_count" => 0} } } = response end @@ -101,7 +104,8 @@ defmodule Pleroma.Web.MastodonAPI.MarkerControllerTest do "notifications" => %{ "last_read_id" => "69888", "updated_at" => NaiveDateTime.to_iso8601(marker.updated_at), - "version" => 0 + "version" => 0, + "pleroma" => %{"unread_count" => 0} } } end |