mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
Add a test to ensure OAuth tokens are tied to Push subscriptions
This commit is contained in:
parent
035c2c1415
commit
c495e6d387
1 changed files with 9 additions and 1 deletions
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in a new issue