Skip to content

Commit 0bce50c

Browse files
committed
style: dart format
1 parent 6f1f469 commit 0bce50c

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

packages/postgrest/test/transforms_test.dart

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,7 @@ void main() {
359359

360360
test('maxAffected method can be called on delete operations', () {
361361
expect(
362-
() => postgrest
363-
.from('channels')
364-
.delete()
365-
.eq('id', 999)
366-
.maxAffected(5),
362+
() => postgrest.from('channels').delete().eq('id', 999).maxAffected(5),
367363
returnsNormally,
368364
);
369365
});
@@ -377,10 +373,8 @@ void main() {
377373

378374
test('maxAffected method can be called on insert operations', () {
379375
expect(
380-
() => postgrest
381-
.from('users')
382-
.insert({'username': 'test'})
383-
.maxAffected(1),
376+
() =>
377+
postgrest.from('users').insert({'username': 'test'}).maxAffected(1),
384378
returnsNormally,
385379
);
386380
});
@@ -423,8 +417,10 @@ void main() {
423417

424418
expect(customHttpClient.lastRequest, isNotNull);
425419
expect(customHttpClient.lastRequest!.headers['Prefer'], isNotNull);
426-
expect(customHttpClient.lastRequest!.headers['Prefer'], contains('handling=strict'));
427-
expect(customHttpClient.lastRequest!.headers['Prefer'], contains('max-affected=5'));
420+
expect(customHttpClient.lastRequest!.headers['Prefer'],
421+
contains('handling=strict'));
422+
expect(customHttpClient.lastRequest!.headers['Prefer'],
423+
contains('max-affected=5'));
428424
});
429425

430426
test('maxAffected sets correct headers for delete', () async {
@@ -440,8 +436,10 @@ void main() {
440436

441437
expect(customHttpClient.lastRequest, isNotNull);
442438
expect(customHttpClient.lastRequest!.headers['Prefer'], isNotNull);
443-
expect(customHttpClient.lastRequest!.headers['Prefer'], contains('handling=strict'));
444-
expect(customHttpClient.lastRequest!.headers['Prefer'], contains('max-affected=10'));
439+
expect(customHttpClient.lastRequest!.headers['Prefer'],
440+
contains('handling=strict'));
441+
expect(customHttpClient.lastRequest!.headers['Prefer'],
442+
contains('max-affected=10'));
445443
});
446444

447445
test('maxAffected preserves existing Prefer headers', () async {
@@ -463,20 +461,21 @@ void main() {
463461
expect(preferHeader, contains('max-affected=3'));
464462
});
465463

466-
test('maxAffected works with select operations (sets headers but likely ineffective)', () async {
464+
test(
465+
'maxAffected works with select operations (sets headers but likely ineffective)',
466+
() async {
467467
try {
468-
await postgrestCustomHttpClient
469-
.from('users')
470-
.select()
471-
.maxAffected(2);
468+
await postgrestCustomHttpClient.from('users').select().maxAffected(2);
472469
} catch (_) {
473470
// Expected to fail with custom client, we just want to check headers
474471
}
475472

476473
expect(customHttpClient.lastRequest, isNotNull);
477474
expect(customHttpClient.lastRequest!.headers['Prefer'], isNotNull);
478-
expect(customHttpClient.lastRequest!.headers['Prefer'], contains('handling=strict'));
479-
expect(customHttpClient.lastRequest!.headers['Prefer'], contains('max-affected=2'));
475+
expect(customHttpClient.lastRequest!.headers['Prefer'],
476+
contains('handling=strict'));
477+
expect(customHttpClient.lastRequest!.headers['Prefer'],
478+
contains('max-affected=2'));
480479
});
481480
});
482481
}

0 commit comments

Comments
 (0)