返回图像 / PNG 的 APIary 调用的 Dredd 测试失败。是否可以不检查返回图像的内容,而只是检查有一个不为空的图像作为响应?
这是我的测试的输出:
[31mfail [39m: GET /imp-endpoint/api/V1/Resources?left_lower_lat=52.482780222078205&left_lower_lng=13.3154296875&right_upper_lng=13.359375&right_upper_lat=52.50953477032729&width=250&heigth=250 duration: 1176ms
[31mfail [39m: body: Real and expected data does not match.
[32mrequest [39m:
body:
headers:
accept: image/png
User-Agent: Dredd/0.3.7 (Linux 3.5.0-52-generic; ia32)
Authorization: Basic ZG1wOmRtcEAxMjM0
uri: /imp-endpoint/api/V1/Resources?left_lower_lat=52.482780222078205&left_lower_lng=13.3154296875&right_upper_lng=13.359375&right_upper_lat=52.50953477032729&width=250&heigth=250
method: GET
[31mexpected [39m:
headers:
content-type: image/png
body:
�PNG
statusCode: 200
[31mactual [39m:
statusCode: 200
headers:
x-powered-by: Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Oracle Corporation/1.7)
server: GlassFish Server Open Source Edition 3.1.2.2
access-control-allow-origin: *
access-control-allow-methods: GET, POST, PUT, DELETE, OPTIONS
content-type: image/png
content-length: 26572
date: Tue, 15 Jul 2014 09:00:26 GMT
body:
�PNG
IHDR � ?1g�IDATx^��