- xml = xml_attr_rewrite(xml_for_node(private_node), "lat", 91.0)
- put api_node_path(private_node), :params => xml.to_s, :headers => auth_header
- assert_require_public_data "node at lat=91 should be forbidden, when data isn't public"
-
- xml = xml_attr_rewrite(xml_for_node(private_node), "lat", -91.0)
- put api_node_path(private_node), :params => xml.to_s, :headers => auth_header
- assert_require_public_data "node at lat=-91 should be forbidden, when data isn't public"
-
- xml = xml_attr_rewrite(xml_for_node(private_node), "lon", 181.0)
- put api_node_path(private_node), :params => xml.to_s, :headers => auth_header
- assert_require_public_data "node at lon=181 should be forbidden, when data isn't public"
-
- xml = xml_attr_rewrite(xml_for_node(private_node), "lon", -181.0)
- put api_node_path(private_node), :params => xml.to_s, :headers => auth_header
- assert_require_public_data "node at lon=-181 should be forbidden, when data isn't public"
+ invalid_attr_values.each do |name, value|
+ xml = xml_attr_rewrite(xml_for_node(private_node), name, value)
+ put api_node_path(private_node), :params => xml.to_s, :headers => auth_header
+ assert_require_public_data "node at #{name}=#{value} should be forbidden, when data isn't public"
+ end