assertSuccess method

void assertSuccess()

Asserts 2xx.

Implementation

void assertSuccess() {
  if (statusCode < 200 || statusCode > 299) {
    throw TestAssertionError('expected 2xx, got $statusCode\n$body');
  }
}