expectHeader method

TestResponse expectHeader(
  1. String name,
  2. Object? matcher
)

fail the test when the header name does not match matcher. Use isNull to check that a header is not there.

Implementation

TestResponse expectHeader(String name, Object? matcher) {
  expect(header(name), matcher, reason: 'Header $name');
  return this;
}