X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8fe18995964717ff6f88858291c6f464cc40397f..8d2d6e1a521e4d7759158cd423d6b0bb746a511f:/test/controllers/relation_controller_test.rb?ds=sidebyside
diff --git a/test/controllers/relation_controller_test.rb b/test/controllers/relation_controller_test.rb
index ae6c94667..0366ceef0 100644
--- a/test/controllers/relation_controller_test.rb
+++ b/test/controllers/relation_controller_test.rb
@@ -165,8 +165,8 @@ class RelationControllerTest < ActionController::TestCase
# This time try with a role attribute in the relation
nid = current_nodes(:used_node_1).id
content "" +
- "" +
- ""
+ "" +
+ ""
put :create
# hope for forbidden due to user
assert_response :forbidden,
@@ -177,7 +177,7 @@ class RelationControllerTest < ActionController::TestCase
# need a role attribute to be included
nid = current_nodes(:used_node_1).id
content "" +
- "" + ""
+ "" + ""
put :create
# hope for forbidden due to user
assert_response :forbidden,
@@ -188,9 +188,9 @@ class RelationControllerTest < ActionController::TestCase
nid = current_nodes(:used_node_1).id
wid = current_ways(:used_way).id
content "" +
- "" +
- "" +
- ""
+ "" +
+ "" +
+ ""
put :create
# hope for forbidden, due to user
assert_response :forbidden,
@@ -233,8 +233,8 @@ class RelationControllerTest < ActionController::TestCase
# This time try with a role attribute in the relation
nid = current_nodes(:used_node_1).id
content "" +
- "" +
- ""
+ "" +
+ ""
put :create
# hope for success
assert_response :success,
@@ -265,7 +265,7 @@ class RelationControllerTest < ActionController::TestCase
# need a role attribute to be included
nid = current_nodes(:used_node_1).id
content "" +
- "" + ""
+ "" + ""
put :create
# hope for success
assert_response :success,
@@ -296,9 +296,9 @@ class RelationControllerTest < ActionController::TestCase
nid = current_nodes(:used_node_1).id
wid = current_ways(:used_way).id
content "" +
- "" +
- "" +
- ""
+ "" +
+ "" +
+ ""
put :create
# hope for success
assert_response :success,
@@ -337,6 +337,7 @@ class RelationControllerTest < ActionController::TestCase
def test_update_relation_tags
basic_authorization "test@example.com", "test"
rel_id = current_relations(:multi_tag_relation).id
+ create_list(:relation_tag, 4, :relation => current_relations(:multi_tag_relation))
cs_id = changesets(:public_user_first_change).id
with_relation(rel_id) do |rel|
@@ -366,6 +367,7 @@ class RelationControllerTest < ActionController::TestCase
def test_update_relation_tags_via_upload
basic_authorization users(:public_user).email, "test"
rel_id = current_relations(:multi_tag_relation).id
+ create_list(:relation_tag, 4, :relation => current_relations(:multi_tag_relation))
cs_id = changesets(:public_user_first_change).id
with_relation(rel_id) do |rel|
@@ -412,8 +414,8 @@ class RelationControllerTest < ActionController::TestCase
# create a relation with non-existing node as member
content "" +
- "" +
- ""
+ "" +
+ ""
put :create
# expect failure
assert_response :precondition_failed,
@@ -432,8 +434,8 @@ class RelationControllerTest < ActionController::TestCase
# create some xml that should return an error
content "" +
- "" +
- ""
+ "" +
+ ""
put :create
# expect failure
assert_response :bad_request
@@ -607,8 +609,7 @@ class RelationControllerTest < ActionController::TestCase
[current_nodes(:used_node_1),
current_nodes(:used_node_2),
current_ways(:used_way),
- current_ways(:way_with_versions)
- ].each_with_index do |element, _version|
+ current_ways(:way_with_versions)].each_with_index do |element, _version|
bbox = element.bbox.to_unscaled
check_changeset_modify(bbox) do |changeset_id|
relation_xml = Relation.find(relation_id).to_xml
@@ -963,7 +964,7 @@ OSM
a_tags.each do |k, v|
assert_equal v, b_tags[k],
"Tags which were not altered should be the same. " +
- "#{a_tags.inspect} != #{b_tags.inspect}"
+ "#{a_tags.inspect} != #{b_tags.inspect}"
end
end