[openstreetmap/openstreetmap-website] Diary entry comment subscriptions (#1309)
Andy Allan
notifications at github.com
Fri Oct 7 12:44:21 UTC 2016
gravitystorm commented on this pull request.
Code looks good, a couple of notes on the comments
> + ##
+ # test unsubscribe fail
+ def test_unsubscribe_fail
+ diary_entry = create(:diary_entry, :user_id => users(:normal_user).id)
+
+ # not signed in
+ assert_no_difference "diary_entry.subscribers.count" do
+ post :unsubscribe, :id => diary_entry.id, :display_name => diary_entry.user.display_name
+ end
+ assert_response :forbidden
+
+ # bad diary id
+ post :unsubscribe, { :id => 999111, :display_name => "username" }, { :user => users(:public_user).id }
+ assert_response :not_found
+
+ # trying to subscribe when already subscribed
This comment should be "trying to unsubscribe when not subscribed"
> @@ -641,6 +662,72 @@ def test_comments
assert_response :not_found
end
+ ##
+ # test subscribe success
+ def test_subscribe_success
I'm not sure the comments here are adding anything - they are just repeating the name of the test without the underscores. (+further 3 times below)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1309#pullrequestreview-3293538
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20161007/547be50c/attachment.html>
More information about the rails-dev
mailing list