X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=inline;f=test%2Fweb%2Fpush%2Fimpl_test.exs;h=089d55577c9771956125326c854adf85d7e03e02;hb=6d797b99282ff1067c6af04b3e1775ff2281333b;hp=acae7a734deca67cb8d147f0c58e8d26feebb349;hpb=2b821036c4bd84cee51c9fcace5a4b3764c3bba1;p=akkoma
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
+# Copyright © 2017-2020 Pleroma Authors
# 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")