]> git.openstreetmap.org Git - rails.git/blobdiff - test/functional/changeset_controller_test.rb
Use num_changes to detect empty changesets instead of the bbox
[rails.git] / test / functional / changeset_controller_test.rb
index 01600c2d99d47466368c5fc99fcc60f7eb2981ff..0d062ab2d801cf6477fdc3f84ca279b131606c00 100644 (file)
@@ -1643,14 +1643,14 @@ EOF
   ##
   # This should display the last 20 changesets closed.
   def test_list
-    changesets = Changeset.find(:all, :order => "created_at DESC", :conditions => ['min_lat IS NOT NULL'], :limit=> 20)
+    changesets = Changeset.find(:all, :order => "created_at DESC", :conditions => ['num_changes > 0'], :limit=> 20)
     assert changesets.size <= 20
     get :list, {:format => "html"}
     assert_response :success
     assert_template "list"
     # Now check that all 20 (or however many were returned) changesets are in the html
     assert_select "h1", :text => "Changesets", :count => 1
-    assert_select "table[id='changeset_list'] tr", :count => changesets.size + 1
+    assert_select "table[id='changeset_list'] tr", :count => changesets.size
     changesets.each do |changeset|
       # FIXME this test needs rewriting - test for table contents
     end