Skip to content
Snippets Groups Projects
Commit 97dae772 authored by feld's avatar feld
Browse files

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
parents 87e8d792 c495e6d3
No related branches found
No related tags found
No related merge requests found
# 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 @@ test "delete subscription if result send message between 400..500" 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")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment