[openstreetmap/openstreetmap-website] Note subscriptions API (PR #5314)
Anton Khorev
notifications at github.com
Thu Nov 14 09:49:30 UTC 2024
@AntonKhorev commented on this pull request.
> + end
+
+ def test_destroy
+ user = create(:user)
+ auth_header = bearer_authorization_header user
+ note = create(:note_with_comments)
+ create(:note_subscription, :user => user, :note => note)
+ assert_equal [user], note.subscribers
+
+ assert_difference "NoteSubscription.count", -1 do
+ assert_difference "note.subscribers.count", -1 do
+ delete api_note_subscription_path(note), :headers => auth_header
+ assert_response :success
+ end
+ end
+ end
added
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5314#discussion_r1841890053
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5314/review/2435559592 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241114/50bb2e33/attachment.htm>
More information about the rails-dev
mailing list