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
##
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
# 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