Stickers in storage service
This commit is contained in:
parent
d8a7e99c81
commit
b47a906211
18 changed files with 1216 additions and 80 deletions
|
@ -2357,4 +2357,36 @@ describe('SQL migrations test', () => {
|
|||
assert.strictEqual(payload.urgent, 1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('updateToSchemaVersion65', () => {
|
||||
it('initializes sticker pack positions', () => {
|
||||
updateToVersion(64);
|
||||
|
||||
db.exec(
|
||||
`
|
||||
INSERT INTO sticker_packs
|
||||
(id, key, lastUsed)
|
||||
VALUES
|
||||
("a", "key-1", 1),
|
||||
("b", "key-2", 2),
|
||||
("c", "key-3", 3);
|
||||
`
|
||||
);
|
||||
|
||||
updateToVersion(65);
|
||||
|
||||
assert.deepStrictEqual(
|
||||
db
|
||||
.prepare(
|
||||
'SELECT id, position FROM sticker_packs ORDER BY position DESC'
|
||||
)
|
||||
.all(),
|
||||
[
|
||||
{ id: 'a', position: 2 },
|
||||
{ id: 'b', position: 1 },
|
||||
{ id: 'c', position: 0 },
|
||||
]
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue