Skip to content

Commit 67ce17c

Browse files
chrisbobbegnprice
authored andcommitted
api test [nfc]: Change a positional param to be named instead
1 parent 5788cb9 commit 67ce17c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/api/core_test.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void main() {
8181
});
8282

8383
test('ApiConnection.postFileFromStream', () async {
84-
Future<void> checkRequest(List<List<int>> content, int length, String? filename) {
84+
Future<void> checkRequest(List<List<int>> content, int length, {String? filename}) {
8585
return FakeApiConnection.with_(account: eg.selfAccount, (connection) async {
8686
connection.prepare(json: {});
8787
await connection.postFileFromStream(
@@ -105,14 +105,14 @@ void main() {
105105
});
106106
}
107107

108-
checkRequest([], 0, null);
109-
checkRequest(['asdf'.codeUnits], 4, null);
110-
checkRequest(['asd'.codeUnits, 'f'.codeUnits], 4, null);
108+
checkRequest([], 0, filename: null);
109+
checkRequest(['asdf'.codeUnits], 4, filename: null);
110+
checkRequest(['asd'.codeUnits, 'f'.codeUnits], 4, filename: null);
111111

112-
checkRequest(['asdf'.codeUnits], 4, 'info.txt');
112+
checkRequest(['asdf'.codeUnits], 4, filename: 'info.txt');
113113

114-
checkRequest(['asdf'.codeUnits], 1, null); // nothing on client side catches a wrong length
115-
checkRequest(['asdf'.codeUnits], 100, null);
114+
checkRequest(['asdf'.codeUnits], 1, filename: null); // nothing on client side catches a wrong length
115+
checkRequest(['asdf'.codeUnits], 100, filename: null);
116116
});
117117

118118
test('ApiConnection.delete', () async {

0 commit comments

Comments
 (0)