fix(test): apply dart format and prefer_single_quotes lint fixes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas SharedInbox
2026-06-07 05:16:08 +02:00
co-authored by Claude Sonnet 4.6
parent da98967100
commit b944e22b8b
2 changed files with 7 additions and 9 deletions
+1 -2
View File
@@ -296,8 +296,7 @@ void main() {
expect(archiveEmail, isNotNull);
expect(archiveEmail!.mailboxPath, 'Archive');
final inboxEmails =
await r.emails.observeEmails('acc-1', 'INBOX').first;
final inboxEmails = await r.emails.observeEmails('acc-1', 'INBOX').first;
expect(inboxEmails, hasLength(1));
expect(inboxEmails.first.id, 'acc-1:INBOX:50');
+6 -7
View File
@@ -536,16 +536,16 @@ void main() {
// Two emails with the same UID but in different mailboxes — old format.
final now = DateTime.now().millisecondsSinceEpoch ~/ 1000;
rawDb.execute(
"INSERT INTO emails (id, account_id, mailbox_path, uid, received_at, thread_id) "
'INSERT INTO emails (id, account_id, mailbox_path, uid, received_at, thread_id) '
"VALUES ('acc-1:50', 'acc-1', 'INBOX', 50, $now, 'acc-1:50')",
);
rawDb.execute(
"INSERT INTO emails (id, account_id, mailbox_path, uid, received_at) "
'INSERT INTO emails (id, account_id, mailbox_path, uid, received_at) '
"VALUES ('acc-1:50-arch', 'acc-1', 'Archive', 50, $now)",
);
// A third email with a Message-ID-based thread_id (should not be changed).
rawDb.execute(
"INSERT INTO emails (id, account_id, mailbox_path, uid, received_at, thread_id) "
'INSERT INTO emails (id, account_id, mailbox_path, uid, received_at, thread_id) '
"VALUES ('acc-1:99', 'acc-1', 'INBOX', 99, $now, '<original@example.com>')",
);
@@ -556,13 +556,13 @@ void main() {
// Thread for the first email (old-format IDs).
rawDb.execute(
"INSERT INTO threads (account_id, mailbox_path, id, latest_date, latest_email_id, email_ids_json) "
'INSERT INTO threads (account_id, mailbox_path, id, latest_date, latest_email_id, email_ids_json) '
"VALUES ('acc-1', 'INBOX', 'acc-1:50', $now, 'acc-1:50', '[\"acc-1:50\"]')",
);
// A pending change referencing the first email's old ID.
rawDb.execute(
"INSERT INTO pending_changes (account_id, resource_type, resource_id, change_type, payload, created_at) "
'INSERT INTO pending_changes (account_id, resource_type, resource_id, change_type, payload, created_at) '
"VALUES ('acc-1', 'Email', 'acc-1:50', 'flag_seen', '{\"seen\":true}', $now)",
);
@@ -589,8 +589,7 @@ void main() {
expect(bodyRows.first.emailId, 'acc-1:INBOX:50');
// thread_id where it was the email's own ID should be updated.
final inboxEmail =
emailRows.firstWhere((r) => r.id == 'acc-1:INBOX:50');
final inboxEmail = emailRows.firstWhere((r) => r.id == 'acc-1:INBOX:50');
expect(inboxEmail.threadId, 'acc-1:INBOX:50');
// thread_id based on a real Message-ID must be left unchanged.