diff options
author | Mark Felder <feld@FreeBSD.org> | 2020-06-11 10:25:00 -0500 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2020-06-11 10:25:00 -0500 |
commit | 8a59fde0e57afebfc07c147d070e66bf9c8db6a9 (patch) | |
tree | 7a2f194d5f0afabaed1f1cc5adda7c2078336979 /test/web/mastodon_api/controllers/notification_controller_test.exs | |
parent | 99afc7f4e423997079aaee1287b9ffb28a851d8b (diff) | |
parent | 5d6ec6e5fc9b00d367568dd111816b90cddad02b (diff) | |
download | pleroma-8a59fde0e57afebfc07c147d070e66bf9c8db6a9.tar.gz pleroma-8a59fde0e57afebfc07c147d070e66bf9c8db6a9.zip |
Merge branch 'develop' into fix/csp-mediaproxy-base-url
Diffstat (limited to 'test/web/mastodon_api/controllers/notification_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/controllers/notification_controller_test.exs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/web/mastodon_api/controllers/notification_controller_test.exs b/test/web/mastodon_api/controllers/notification_controller_test.exs index e278d61f5..698c99711 100644 --- a/test/web/mastodon_api/controllers/notification_controller_test.exs +++ b/test/web/mastodon_api/controllers/notification_controller_test.exs @@ -54,6 +54,27 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do assert response == expected_response end + test "by default, does not contain pleroma:chat_mention" do + %{user: user, conn: conn} = oauth_access(["read:notifications"]) + other_user = insert(:user) + + {:ok, _activity} = CommonAPI.post_chat_message(other_user, user, "hey") + + result = + conn + |> get("/api/v1/notifications") + |> json_response_and_validate_schema(200) + + assert [] == result + + result = + conn + |> get("/api/v1/notifications?include_types[]=pleroma:chat_mention") + |> json_response_and_validate_schema(200) + + assert [_] = result + end + test "getting a single notification" do %{user: user, conn: conn} = oauth_access(["read:notifications"]) other_user = insert(:user) |