status method

ResponseExpect status(
  1. int expected
)

Asserts the response has the given status code.

Implementation

ResponseExpect status(int expected) {
  if (_response.status != expected) {
    throw ChaseTestFailure(
      'Expected status $expected but got ${_response.status}',
    );
  }
  return this;
}