]> git.openstreetmap.org Git - rails.git/commitdiff
Ensure closed changesets appear in the feed, and update some misleading comments.
authorAndy Allan <git@gravitystorm.co.uk>
Thu, 1 Jun 2017 14:43:51 +0000 (15:43 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Thu, 1 Jun 2017 14:43:51 +0000 (15:43 +0100)
.rubocop_todo.yml
app/controllers/changeset_controller.rb
test/controllers/changeset_controller_test.rb

index c8788ad660574bb310d0232238194f62d2d1d235..ce7e5d9b2e584c688d0b393839fb403d419b9653 100644 (file)
@@ -64,7 +64,7 @@ Metrics/BlockNesting:
 # Offense count: 62
 # Configuration parameters: CountComments.
 Metrics/ClassLength:
-  Max: 1781
+  Max: 1782
 
 # Offense count: 69
 Metrics/CyclomaticComplexity:
index da066a73afa4bc703f293067ad536ea7c63536e7..77ca20fbea9a2d1012ddf0c80b7db7eaf6d03666 100644 (file)
@@ -248,7 +248,7 @@ class ChangesetController < ApplicationController
   end
 
   ##
-  # list edits (open changesets) in reverse chronological order
+  # list non-empty changesets in reverse chronological order
   def list
     if request.format == :atom && params[:max_id]
       redirect_to url_for(params.merge(:max_id => nil)), :status => :moved_permanently
index 3e081a079892de23a7596a4454fdb7586a9f0b3b..db0ee5e967baf598ee227722a69975b86820ff64 100644 (file)
@@ -2044,9 +2044,10 @@ EOF
   end
 
   ##
-  # This should display the last 20 changesets closed
+  # This should display the last 20 non-empty changesets
   def test_feed
     changeset = create(:changeset, :num_changes => 1)
+    closed_changeset = create(:changeset, :closed, :num_changes => 1)
     _empty_changeset = create(:changeset, :num_changes => 0)
 
     get :feed, :format => :atom
@@ -2054,7 +2055,7 @@ EOF
     assert_template "list"
     assert_equal "application/atom+xml", response.content_type
 
-    check_feed_result([changeset])
+    check_feed_result([changeset, closed_changeset])
   end
 
   ##