- ##
- # check that the current version of a way is equivalent to the
- # version which we're getting from the versions call.
- def check_current_version(way_id)
- # get the current version
- current_way = with_controller(WaysController.new) do
- get api_way_path(way_id)
- assert_response :success, "can't get current way #{way_id}"
- Way.from_xml(@response.body)
- end
- assert_not_nil current_way, "getting way #{way_id} returned nil"
-
- # get the "old" version of the way from the version method
- get api_old_way_path(way_id, current_way.version)
- assert_response :success, "can't get old way #{way_id}, v#{current_way.version}"
- old_way = Way.from_xml(@response.body)
-
- # check that the ways are identical
- assert_ways_are_equal current_way, old_way
- end
-