dimanche 24 janvier 2016

Deprecation warning for integration test on http header

I'm using MiniTest and in an integration test have the line:

assert_select response.header['Content-Type'], "application/json"

It however responds with:

DEPRECATION WARNING: The assertion was not run because of an 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 from block in class:SessionsTest> at (byebug):1)

Does anyone understand what this causes and how to (alternatively) test the header?

Aucun commentaire:

Enregistrer un commentaire