Skip to content

Commit

Permalink
All more stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianquinlan committed Sep 13, 2023
1 parent b056209 commit da5340e
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,13 @@ void testResponseStatusLine(Client client) async {
'without reason phrase',
() async {
httpServerChannel.sink.add('HTTP/1.1 201');
await expectLater(
client.get(Uri.http(host, '')),
anyOf(
throwsA(isA<ClientException>()),
predicate<Response>(
(response) => response.reasonPhrase == 'Created'),
'reason phrase is "Created"'),
);
try {
final response = await client.get(Uri.http(host, ''));
// All of these responses seem reasonable.
expect(response.reasonPhrase, anyOf(isNull, '', 'Created'));
} on ClientException {
// A Reason-Phrase is required according to RFC-2616
}
},
);
});
Expand Down

0 comments on commit da5340e

Please sign in to comment.