WK wrote on 12/09/2014 10:47 AM:
Tere!
2014-12-08 11:12 GMT+02:00 Brilliantov Kirill Vladimirovich
<[email protected]>:
response_headers_are_deeply [GET => $i], ['Content-Type' =>
'text/xml'];
...
# Failed test 'headers are as expected for GET /rest/node'
# at t/002_rest_node_route.t line 20.
# Structures begin differing at:
# $got->[2] = 'Server'
# $expected->[2] = Does not exist
I never used *_deeply tests neither in Test::More or Dancer::Test, but
I see contradiction in docs. Test::More says about is_deeply:
"it does a deep comparison walking each data structure to see if they
are equivalent. If the two structures are different, it will display
the place where they start differing."
Dancer::Test says about response_headers_are_deeply (uses is_deeply internally):
"Asserts that the response headers data structure equals the one given"
According to Test::More, your test should fail, because your expected
data differs from what you got as response.
Ok, test success after change on response_headers_include
--
Best regards,
Brilliantov Kirill Vladimirovich
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users