contentType method

ResponseExpect contentType(
  1. String expected
)

Asserts the response has the given content type.

Implementation

ResponseExpect contentType(String expected) {
  final ct = _response.contentType;
  if (ct == null || !ct.contains(expected)) {
    throw ChaseTestFailure(
      'Expected content-type containing "$expected" but got "$ct"',
    );
  }
  return this;
}