"</changeset></osm>"
put changeset_create_path, :params => xml, :headers => auth_header
- assert_response :success, "Creation of changeset did not return sucess status"
+ assert_response :success, "Creation of changeset did not return success status"
newid = @response.body.to_i
# check end time, should be an hour ahead of creation time
duration = cs.closed_at - cs.created_at
# the difference can either be a rational, or a floating point number
# of seconds, depending on the code path taken :-(
- if duration.class == Rational
+ if duration.instance_of?(Rational)
assert_equal Rational(1, 24), duration, "initial idle timeout should be an hour (#{cs.created_at} -> #{cs.closed_at})"
else
# must be number of seconds...
# test that it really is closed now
cs = Changeset.find(changeset.id)
assert_not(cs.is_open?,
- "changeset should be closed now (#{cs.closed_at} > #{Time.now.getutc}.")
+ "changeset should be closed now (#{cs.closed_at} > #{Time.now.utc}.")
end
##
# upload it
post changeset_upload_path(changeset), :params => diff, :headers => auth_header
assert_response :bad_request,
- "shoudln't be able to upload too long a tag to changeset: #{@response.body}"
+ "shouldn't be able to upload too long a tag to changeset: #{@response.body}"
end
##
CHANGESET
post changeset_upload_path(changeset), :params => diff, :headers => auth_header
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("Unknown action ping, choices are create, modify, delete", @response.body)
end
##
# upload it
post changeset_upload_path(changeset), :params => diff, :headers => auth_header
assert_response(:success, "should be able to upload " \
- "empty changeset: " + diff)
+ "empty changeset: " + diff)
end
end
<node id='-7' visible='true' changeset='#{changeset_id}' lat='51.49560784152179' lon='-0.18694719410005425' />
<node id='-8' visible='true' changeset='#{changeset_id}' lat='51.49567389979617' lon='-0.1860289771788006' />
<node id='-9' visible='true' changeset='#{changeset_id}' lat='51.49543761398892' lon='-0.186820684213126' />
- <way id='-10' action='modiy' visible='true' changeset='#{changeset_id}'>
+ <way id='-10' action='modify' visible='true' changeset='#{changeset_id}'>
<nd ref='-1' />
<nd ref='-2' />
<nd ref='-3' />
get changeset_download_path(changeset)
assert_response :success
- assert_template nil
# print @response.body
# FIXME: needs more assert_select tests
assert_select "osmChange[version='#{Settings.api_version}'][generator='#{Settings.generator}']" do