Skip to content

Commit

Permalink
wip test use proper skip: true
Browse files Browse the repository at this point in the history
  • Loading branch information
gnprice committed Oct 18, 2023
1 parent 897ae5d commit 8e3b95d
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions test/api/notifications_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,10 @@ void main() {
test("${n++}", () => checkParseFails({ ...dmJson, 'realm_id': '12,34' }));
test("${n++}", () => checkParseFails({ ...dmJson, 'realm_id': 'abc' }));
test("${n++}", () => checkParseFails({ ...dmJson }..remove('realm_uri')));
// test("${n++}", () => checkParseFails({ ...dmJson, 'realm_uri': 'zulip.example.com' })); // FAILS
// test("${n++}", () => checkParseFails({ ...dmJson, 'realm_uri': '/examplecorp' })); // FAILS
test(skip: true, // Dart's Uri.parse is lax in what it accepts.
"${n++}", () => checkParseFails({ ...dmJson, 'realm_uri': 'zulip.example.com' }));
test(skip: true, // Dart's Uri.parse is lax in what it accepts.
"${n++}", () => checkParseFails({ ...dmJson, 'realm_uri': '/examplecorp' }));

test("${n++}", () => checkParseFails({ ...streamJson, 'stream_id': '12,34' }));
test("${n++}", () => checkParseFails({ ...streamJson, 'stream_id': 'abc' }));
Expand All @@ -157,8 +159,10 @@ void main() {
test("${n++}", () => checkParseFails({ ...groupDmJson, 'pm_users': '12,' }));

test("${n++}", () => checkParseFails({ ...dmJson }..remove('sender_avatar_url')));
// test("${n++}", () => checkParseFails({ ...dmJson, 'sender_avatar_url': '/avatar/123.jpeg' })); // FAILS
// test("${n++}", () => checkParseFails({ ...dmJson, 'sender_avatar_url': '' })); // FAILS
test(skip: true, // Dart's Uri.parse is lax in what it accepts.
"${n++}", () => checkParseFails({ ...dmJson, 'sender_avatar_url': '/avatar/123.jpeg' }));
test(skip: true, // Dart's Uri.parse is lax in what it accepts.
"${n++}", () => checkParseFails({ ...dmJson, 'sender_avatar_url': '' }));

test("${n++}", () => checkParseFails({ ...dmJson }..remove('sender_id')));
test("${n++}", () => checkParseFails({ ...dmJson }..remove('sender_email')));
Expand Down Expand Up @@ -213,8 +217,10 @@ void main() {
test("${n++}", () => checkParseFails({ ...baseJson, 'realm_id': 'abc' }));
test("${n++}", () => checkParseFails({ ...baseJson, 'realm_id': '12,34' }));
test("${n++}", () => checkParseFails({ ...baseJson }..remove('realm_uri')));
// test("${n++}", () => checkParseFails({ ...baseJson, 'realm_uri': 'zulip.example.com' })); // FAILS
// test("${n++}", () => checkParseFails({ ...baseJson, 'realm_uri': '/examplecorp' })); // FAILS
test(skip: true, // Dart's Uri.parse is lax in what it accepts.
"${n++}", () => checkParseFails({ ...baseJson, 'realm_uri': 'zulip.example.com' }));
test(skip: true, // Dart's Uri.parse is lax in what it accepts.
"${n++}", () => checkParseFails({ ...baseJson, 'realm_uri': '/examplecorp' }));

for (final badIntList in ["abc,34", "12,abc", "12,", ""]) {
test("${n++}", () => checkParseFails({ ...baseJson, 'zulip_message_ids': badIntList }));
Expand Down

0 comments on commit 8e3b95d

Please sign in to comment.