assertStatus method
Asserts that the response status code matches expected.
Implementation
TestResponse assertStatus(int expected) {
expect(
raw.statusCode,
expected,
reason: 'Expected status $expected but got ${raw.statusCode}.\nBody: ${raw.body}',
);
return this;
}