@remit/drizzle-service 0.0.72 → 0.0.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -148,6 +148,27 @@ describe("DrizzleMessageRepository (sqlite)", () => {
|
|
|
148
148
|
assert.equal(result.item.messageId, MESSAGE_ID);
|
|
149
149
|
});
|
|
150
150
|
|
|
151
|
+
// The state every inbound sync row is born in, and the one the re-point gate
|
|
152
|
+
// in mailbox-service has to accept (#1096): the sync path supplies no
|
|
153
|
+
// syncStatus and nothing later promotes what the repository writes here.
|
|
154
|
+
test("upsertWithStatus writes pending when the caller names no syncStatus", async () => {
|
|
155
|
+
const inboundId = "00000000-0000-0000-2222-000000000009";
|
|
156
|
+
const { item, created } = await repo.upsertWithStatus({
|
|
157
|
+
messageId: inboundId,
|
|
158
|
+
mailboxId: MAILBOX_ID,
|
|
159
|
+
uid: 43,
|
|
160
|
+
sequenceNumber: 2,
|
|
161
|
+
rfc822Size: 1024,
|
|
162
|
+
internalDate: NOW,
|
|
163
|
+
envelopeId: deriveEnvelopeId(inboundId),
|
|
164
|
+
rootBodyPartId: deriveRootBodyPartId(inboundId),
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
assert.equal(created, true);
|
|
168
|
+
assert.equal(item.syncStatus, "pending");
|
|
169
|
+
assert.equal(item.status, "active");
|
|
170
|
+
});
|
|
171
|
+
|
|
151
172
|
test("delete removes the message and appends a removal outbox row", async () => {
|
|
152
173
|
await repo.delete(MESSAGE_ID);
|
|
153
174
|
await assert.rejects(() => repo.get(MESSAGE_ID));
|