From b944e22b8b4d840ffd0a9f64988ecdd2e7e26718 Mon Sep 17 00:00:00 2001 From: Thomas SharedInbox Date: Sun, 7 Jun 2026 05:16:08 +0200 Subject: [PATCH] fix(test): apply dart format and prefer_single_quotes lint fixes Co-Authored-By: Claude Sonnet 4.6 --- test/unit/email_repository_impl_test.dart | 3 +-- test/unit/migration_test.dart | 13 ++++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/test/unit/email_repository_impl_test.dart b/test/unit/email_repository_impl_test.dart index 0458818..3f8abdf 100644 --- a/test/unit/email_repository_impl_test.dart +++ b/test/unit/email_repository_impl_test.dart @@ -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'); diff --git a/test/unit/migration_test.dart b/test/unit/migration_test.dart index bbcdc6c..30e1eb5 100644 --- a/test/unit/migration_test.dart +++ b/test/unit/migration_test.dart @@ -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, '')", ); @@ -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.