Skip to content

Commit

Permalink
test [nfc]: Cut redundant isNotNull checks before isA
Browse files Browse the repository at this point in the history
  • Loading branch information
gnprice authored and chrisbobbe committed Nov 7, 2023
1 parent 6d9f22d commit 391940c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/api/route/messages_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void main() {
messageId: messageId,
applyMarkdown: applyMarkdown,
);
check(connection.lastRequest).isNotNull().isA<http.Request>()
check(connection.lastRequest).isA<http.Request>()
..method.equals('GET')
..url.path.equals('/api/v1/messages/$messageId')
..url.queryParameters.deepEquals(expected);
Expand Down Expand Up @@ -230,7 +230,7 @@ void main() {
numBefore: numBefore, numAfter: numAfter,
clientGravatar: clientGravatar, applyMarkdown: applyMarkdown,
);
check(connection.lastRequest).isNotNull().isA<http.Request>()
check(connection.lastRequest).isA<http.Request>()
..method.equals('GET')
..url.path.equals('/api/v1/messages')
..url.queryParameters.deepEquals(expected);
Expand Down Expand Up @@ -306,7 +306,7 @@ void main() {
final result = await sendMessage(connection,
destination: destination, content: content);
check(result).id.equals(42);
check(connection.lastRequest).isNotNull().isA<http.Request>()
check(connection.lastRequest).isA<http.Request>()
..method.equals('POST')
..url.path.equals('/api/v1/messages')
..bodyFields.deepEquals(expectedBodyFields);
Expand Down Expand Up @@ -363,7 +363,7 @@ void main() {
emojiCode: reaction.emojiCode,
emojiName: reaction.emojiName,
);
check(connection.lastRequest).isNotNull().isA<http.Request>()
check(connection.lastRequest).isA<http.Request>()
..method.equals('POST')
..url.path.equals('/api/v1/messages/$messageId/reactions')
..bodyFields.deepEquals({
Expand Down Expand Up @@ -414,7 +414,7 @@ void main() {
emojiCode: reaction.emojiCode,
emojiName: reaction.emojiName,
);
check(connection.lastRequest).isNotNull().isA<http.Request>()
check(connection.lastRequest).isA<http.Request>()
..method.equals('DELETE')
..url.path.equals('/api/v1/messages/$messageId/reactions')
..bodyFields.deepEquals({
Expand Down

0 comments on commit 391940c

Please sign in to comment.