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