diff options
author | feld <feld@feld.me> | 2020-02-25 16:06:06 +0000 |
---|---|---|
committer | feld <feld@feld.me> | 2020-02-25 16:06:06 +0000 |
commit | 97dae77240720634a32a630da2e2a93da3dd0d44 (patch) | |
tree | 957c7010bc59525c6cdee35a079c9c2530c51bc5 | |
parent | 87e8d792bda62eff57c511229adf98ffd3c996fc (diff) | |
parent | c495e6d387e929977317a039021417934b3328b9 (diff) | |
download | pleroma-97dae77240720634a32a630da2e2a93da3dd0d44.tar.gz |
Merge branch 'token-web-push-test' into 'develop'
Add a test to ensure OAuth tokens are tied to Push subscriptions
Closes #1551
See merge request pleroma/pleroma!2241
-rw-r--r-- | test/web/push/impl_test.exs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/web/push/impl_test.exs b/test/web/push/impl_test.exs index acae7a734..089d55577 100644 --- a/test/web/push/impl_test.exs +++ b/test/web/push/impl_test.exs @@ -1,5 +1,5 @@ # Pleroma: A lightweight social networking server -# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/> +# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/> # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.Push.ImplTest do @@ -98,6 +98,14 @@ defmodule Pleroma.Web.Push.ImplTest do refute Pleroma.Repo.get(Subscription, subscription.id) end + test "deletes subscription when token has been deleted" do + subscription = insert(:push_subscription) + + Pleroma.Repo.delete(subscription.token) + + refute Pleroma.Repo.get(Subscription, subscription.id) + end + test "renders title and body for create activity" do user = insert(:user, nickname: "Bob") |