assertRedirect method

TestResponse assertRedirect([
  1. String? location
])

Implementation

TestResponse assertRedirect([String? location]) {
  _check(
    statusCode >= 300 && statusCode < 400,
    'Expected a redirect but got $statusCode',
  );
  if (location != null) assertHeader('location', location);
  return this;
}