Change sessions.id to a TEXT field to prevent type coercion

This commit is contained in:
Scott Nonnenberg 2018-11-19 17:38:55 -08:00
parent a780fa3bab
commit 11fdf22881
2 changed files with 40 additions and 3 deletions

View file

@ -940,7 +940,7 @@ describe('SignalProtocolStore', () => {
describe('getDeviceIds', () => {
it('returns deviceIds for a number', async () => {
const testRecord = 'an opaque string';
const devices = [1, 2, 3].map(deviceId => {
const devices = [1, 2, 3, 10].map(deviceId => {
return [number, deviceId].join('.');
});
@ -951,7 +951,7 @@ describe('SignalProtocolStore', () => {
);
const deviceIds = await store.getDeviceIds(number);
assert.sameMembers(deviceIds, [1, 2, 3]);
assert.sameMembers(deviceIds, [1, 2, 3, 10]);
});
it('returns empty array for a number with no device ids', async () => {
const deviceIds = await store.getDeviceIds('foo');