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:
co-authored by
Claude Sonnet 4.6
parent
da98967100
commit
b944e22b8b
@@ -296,8 +296,7 @@ void main() {
|
|||||||
expect(archiveEmail, isNotNull);
|
expect(archiveEmail, isNotNull);
|
||||||
expect(archiveEmail!.mailboxPath, 'Archive');
|
expect(archiveEmail!.mailboxPath, 'Archive');
|
||||||
|
|
||||||
final inboxEmails =
|
final inboxEmails = await r.emails.observeEmails('acc-1', 'INBOX').first;
|
||||||
await r.emails.observeEmails('acc-1', 'INBOX').first;
|
|
||||||
expect(inboxEmails, hasLength(1));
|
expect(inboxEmails, hasLength(1));
|
||||||
expect(inboxEmails.first.id, 'acc-1:INBOX:50');
|
expect(inboxEmails.first.id, 'acc-1:INBOX:50');
|
||||||
|
|
||||||
|
|||||||
@@ -536,16 +536,16 @@ void main() {
|
|||||||
// Two emails with the same UID but in different mailboxes — old format.
|
// Two emails with the same UID but in different mailboxes — old format.
|
||||||
final now = DateTime.now().millisecondsSinceEpoch ~/ 1000;
|
final now = DateTime.now().millisecondsSinceEpoch ~/ 1000;
|
||||||
rawDb.execute(
|
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')",
|
"VALUES ('acc-1:50', 'acc-1', 'INBOX', 50, $now, 'acc-1:50')",
|
||||||
);
|
);
|
||||||
rawDb.execute(
|
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)",
|
"VALUES ('acc-1:50-arch', 'acc-1', 'Archive', 50, $now)",
|
||||||
);
|
);
|
||||||
// A third email with a Message-ID-based thread_id (should not be changed).
|
// A third email with a Message-ID-based thread_id (should not be changed).
|
||||||
rawDb.execute(
|
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>')",
|
"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).
|
// Thread for the first email (old-format IDs).
|
||||||
rawDb.execute(
|
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\"]')",
|
"VALUES ('acc-1', 'INBOX', 'acc-1:50', $now, 'acc-1:50', '[\"acc-1:50\"]')",
|
||||||
);
|
);
|
||||||
|
|
||||||
// A pending change referencing the first email's old ID.
|
// A pending change referencing the first email's old ID.
|
||||||
rawDb.execute(
|
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)",
|
"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');
|
expect(bodyRows.first.emailId, 'acc-1:INBOX:50');
|
||||||
|
|
||||||
// thread_id where it was the email's own ID should be updated.
|
// thread_id where it was the email's own ID should be updated.
|
||||||
final inboxEmail =
|
final inboxEmail = emailRows.firstWhere((r) => r.id == 'acc-1:INBOX:50');
|
||||||
emailRows.firstWhere((r) => r.id == 'acc-1:INBOX:50');
|
|
||||||
expect(inboxEmail.threadId, 'acc-1:INBOX:50');
|
expect(inboxEmail.threadId, 'acc-1:INBOX:50');
|
||||||
|
|
||||||
// thread_id based on a real Message-ID must be left unchanged.
|
// thread_id based on a real Message-ID must be left unchanged.
|
||||||
|
|||||||
Reference in New Issue
Block a user