Migrate schema to service ids

This commit is contained in:
Fedor Indutny 2023-08-16 22:54:39 +02:00 committed by Jamie Kyle
parent 71958f8a01
commit 8b0da36caa
258 changed files with 4795 additions and 2613 deletions

View file

@ -2,9 +2,12 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import { generateAci } from '../../types/ServiceId';
import { isConversationSMSOnly } from '../../util/isConversationSMSOnly';
const serviceId = generateAci();
describe('isConversationSMSOnly', () => {
it('returns false if passed an undefined type', () => {
assert.isFalse(
@ -26,7 +29,7 @@ describe('isConversationSMSOnly', () => {
isConversationSMSOnly({
type,
e164: 'e164',
uuid: 'uuid',
serviceId,
discoveredUnregisteredAt: 1,
})
);
@ -37,7 +40,7 @@ describe('isConversationSMSOnly', () => {
isConversationSMSOnly({
type,
e164: 'e164',
uuid: 'uuid',
serviceId,
discoveredUnregisteredAt: Date.now(),
})
);
@ -47,7 +50,7 @@ describe('isConversationSMSOnly', () => {
isConversationSMSOnly({
type,
e164: 'e164',
uuid: 'uuid',
serviceId,
discoveredUnregisteredAt: Date.now() - fiveHours,
})
);