X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ea59d95f4aad7cafe3a0d0b4d5ef533b0662e365..f2656f925e5f47ef6ce58dc014556b34f2d83f6a:/test/controllers/api/changesets_controller_test.rb
diff --git a/test/controllers/api/changesets_controller_test.rb b/test/controllers/api/changesets_controller_test.rb
index 871eac9ed..3b4eef25a 100644
--- a/test/controllers/api/changesets_controller_test.rb
+++ b/test/controllers/api/changesets_controller_test.rb
@@ -63,7 +63,7 @@ module Api
""
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
@@ -71,7 +71,7 @@ module Api
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...
@@ -205,8 +205,8 @@ module Api
# 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}.")
+ assert_not(cs.open?,
+ "changeset should be closed now (#{cs.closed_at} > #{Time.now.utc}.")
end
##
@@ -700,7 +700,7 @@ module Api
# 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
##
@@ -1210,7 +1210,7 @@ module Api
# 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
@@ -1326,7 +1326,7 @@ module Api
-
+
@@ -1428,7 +1428,6 @@ module Api
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
@@ -1744,7 +1743,7 @@ module Api
assert_equal Changeset::MAX_ELEMENTS + 1, changeset.num_changes
# check that the changeset is now closed as well
- assert_not(changeset.is_open?,
+ assert_not(changeset.open?,
"changeset should have been auto-closed by exceeding " \
"element limit.")
end