]> git.openstreetmap.org Git - rails.git/blobdiff - test/functional/changeset_controller_test.rb
Fixup tests for changes in view templates.
[rails.git] / test / functional / changeset_controller_test.rb
index e1cb3a7d484e3139ce8752509dd7cc1f6cba2c82..8f0b2147786cebe98788bb3e76e3cf703956be6e 100644 (file)
@@ -670,7 +670,7 @@ EOF
   content diff
   post :upload, :id => cs_id
   assert_response :bad_request, "Shouldn't be able to upload a diff with the action ping"
-  assert_equal @response.body, "Unknown action ping, choices are create, modify, delete."
+  assert_equal @response.body, "Unknown action ping, choices are create, modify, delete"
   end
 
   ##
@@ -1490,11 +1490,11 @@ EOF
   def test_list
     changesets = Changeset.find(:all, :order => "created_at DESC", :conditions => ['min_lat IS NOT NULL'], :limit=> 20)
     assert changesets.size <= 20
-    get :list
+    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 => "Recent Changes", :count => 1
+    assert_select "h1", :text => "Changesets", :count => 1
     assert_select "table[id='changeset_list'] tr", :count => changesets.size + 1
     changesets.each do |changeset|
       # FIXME this test needs rewriting - test for table contents
@@ -1505,16 +1505,16 @@ EOF
   # Checks the display of the user changesets listing
   def test_list_user
     user = users(:public_user)
-    get :list_user, {:display_name => user.display_name}
+    get :list, {:format => "html", :display_name => user.display_name}
     assert_response :success
-    assert_template 'list_user'
+    assert_template "list"
     ## FIXME need to add more checks to see which if edits are actually shown if your data is public
   end
   
   ##
   # Check the not found of the list user changesets
   def test_list_user_not_found
-    get :list_user, {:display_name => "Some random user"}
+    get :list, {:format => "html", :display_name => "Some random user"}
     assert_response :not_found
     assert_template 'user/no_such_user'
   end