i'm using minitest , in integration test have line:
assert_select response.header['content-type'], "application/json"
it responds with:
deprecation warning: assertion not run because of invalid css selector.
unexpected ';' after '[#nokogiri::css::node:0x000000064b2e58 @type=:child_selector, @value=[#nokogiri::css::node:0x000000064b3268 @type=:element_name, @value=["application"]>, #nokogiri::css::node:0x000000064b2ef8 @type=:element_name, @value=["json"]>]>]' (called block in class:sessionstest> @ (byebug):1)
does understand causes , how (alternatively) test header?
assert_select
used check expectation in dom object, view result.
what should use in case assert_equal
. note that, in assert_equal
, expectation first argument.
assert_equal "application/json", response.header['content-type']
Comments
Post a Comment