X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8fe18995964717ff6f88858291c6f464cc40397f..d63dba03ce37140984accc8a93688b184bdec4c4:/test/controllers/changeset_controller_test.rb
diff --git a/test/controllers/changeset_controller_test.rb b/test/controllers/changeset_controller_test.rb
index 5da65c4c6..ecccb1f5f 100644
--- a/test/controllers/changeset_controller_test.rb
+++ b/test/controllers/changeset_controller_test.rb
@@ -102,16 +102,16 @@ class ChangesetControllerTest < ActionController::TestCase
basic_authorization users(:normal_user).email, "test"
# Create the first user's changeset
content "" +
- "" +
- ""
+ "" +
+ ""
put :create
assert_require_public_data
basic_authorization users(:public_user).email, "test"
# Create the first user's changeset
content "" +
- "" +
- ""
+ "" +
+ ""
put :create
assert_response :success, "Creation of changeset did not return sucess status"
@@ -527,8 +527,8 @@ EOF
# create a temporary changeset
content "" +
- "" +
- ""
+ "" +
+ ""
assert_difference "Changeset.count", 1 do
put :create
end
@@ -1102,8 +1102,8 @@ EOF
basic_authorization users(:public_user).email, "test"
content "" +
- "" +
- ""
+ "" +
+ ""
put :create
assert_response :success
changeset_id = @response.body.to_i
@@ -1140,8 +1140,8 @@ EOF
basic_authorization users(:public_user).email, "test"
content "" +
- "" +
- ""
+ "" +
+ ""
put :create
assert_response :success
changeset_id = @response.body.to_i
@@ -1181,8 +1181,7 @@ EOF
["",
"",
"",
- ""
- ].each do |diff|
+ ""].each do |diff|
# upload it
content diff
post :upload, :id => changesets(:public_user_first_change).id
@@ -1225,8 +1224,8 @@ EOF
# create a temporary changeset
content "" +
- "" +
- ""
+ "" +
+ ""
put :create
assert_response :forbidden
@@ -1235,8 +1234,8 @@ EOF
# create a temporary changeset
content "" +
- "" +
- ""
+ "" +
+ ""
put :create
assert_response :success
changeset_id = @response.body.to_i
@@ -1281,8 +1280,8 @@ EOF
# create a temporary changeset
content "" +
- "" +
- ""
+ "" +
+ ""
put :create
assert_response :success
changeset_id = @response.body.to_i
@@ -1340,8 +1339,8 @@ OSMFILE
# create a temporary changeset
content "" +
- "" +
- ""
+ "" +
+ ""
put :create
assert_response :success
changeset_id = @response.body.to_i
@@ -1574,7 +1573,7 @@ EOF
get :query, :closed => "true"
assert_response :success, "can't get changesets by closed-ness"
- assert_changesets [3, 5, 6, 7, 8]
+ assert_changesets [3, 5, 6, 7, 8, 9]
get :query, :closed => "true", :user => users(:normal_user).id
assert_response :success, "can't get changesets by closed-ness and user"
@@ -1598,8 +1597,7 @@ EOF
def test_query_invalid
["abracadabra!",
"1,2,3,F",
- ";drop table users;"
- ].each do |bbox|
+ ";drop table users;"].each do |bbox|
get :query, :bbox => bbox
assert_response :bad_request, "'#{bbox}' isn't a bbox"
end
@@ -1608,8 +1606,7 @@ EOF
"00-00-00",
";drop table users;",
",",
- "-,-"
- ].each do |time|
+ "-,-"].each do |time|
get :query, :time => time
assert_response :bad_request, "'#{time}' isn't a valid time range"
end
@@ -1617,8 +1614,7 @@ EOF
["me",
"foobar",
"-1",
- "0"
- ].each do |uid|
+ "0"].each do |uid|
get :query, :user => uid
assert_response :bad_request, "'#{uid}' isn't a valid user ID"
end
@@ -2339,10 +2335,11 @@ EOF
assert changesets.size <= 20
assert_select "feed", :count => [changesets.size, 1].min do
- assert_select "entry", :count => changesets.size
+ assert_select "> title", :count => 1, :text => /^Changesets/
+ assert_select "> entry", :count => changesets.size
changesets.each do |changeset|
- assert_select "entry > id", changeset_url(:id => changeset.id)
+ assert_select "> entry > id", changeset_url(:id => changeset.id)
end
end
end