Skip to content

Commit

Permalink
Only allow exception
Browse files Browse the repository at this point in the history
  • Loading branch information
brianquinlan committed Sep 14, 2023
1 parent 2514b15 commit 8968493
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,10 @@ void testResponseStatusLine(Client client,
'without HTTP version',
() async {
httpServerChannel.sink.add('201 Created');
try {
final response = await client.get(Uri.http(host, ''));
expect(response.statusCode, 201);
expect(response.reasonPhrase, 'Created');
} on ClientException {
// A Http-Version is required according to RFC-2616
}
await expectLater(
client.get(Uri.http(host, '')),
throwsA(isA<ClientException>()),
);
},
);

Expand Down

0 comments on commit 8968493

Please sign in to comment.