X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7ce77006fad5205dc85206d5841657967c6f16c3..c9d35839befe92d916425baa4daec7dd77ade929:/test/controllers/amf_controller_test.rb diff --git a/test/controllers/amf_controller_test.rb b/test/controllers/amf_controller_test.rb index 13f01530d..d388114dd 100644 --- a/test/controllers/amf_controller_test.rb +++ b/test/controllers/amf_controller_test.rb @@ -1358,24 +1358,24 @@ class AmfControllerTest < ActionController::TestCase def amf_parse_response req = StringIO.new(@response.body) - req.read(2) # version + req.read(2) # version # parse through any headers - headers = AMF.getint(req) # Read number of headers - headers.times do # Read each header - AMF.getstring(req) # | - req.getc # | skip boolean - AMF.getvalue(req) # | + headers = AMF.getint(req) # Read number of headers + headers.times do # Read each header + AMF.getstring(req) # | + req.getc # | skip boolean + AMF.getvalue(req) # | end # parse through responses results = {} - bodies = AMF.getint(req) # Read number of bodies - bodies.times do # Read each body - message = AMF.getstring(req) # | get message name - AMF.getstring(req) # | get index in response sequence - AMF.getlong(req) # | get total size in bytes - args = AMF.getvalue(req) # | get response (probably an array) + bodies = AMF.getint(req) # Read number of bodies + bodies.times do # Read each body + message = AMF.getstring(req) # | get message name + AMF.getstring(req) # | get index in response sequence + AMF.getlong(req) # | get total size in bytes + args = AMF.getvalue(req) # | get response (probably an array) results[message] = args end @amf_result = results