0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

chore(connector): remove legacy Test passwordless template type use case (#5205)

This commit is contained in:
Darcy Ye 2024-01-08 14:45:26 +08:00 committed by GitHub
parent ade9cf1dc7
commit f15df4409f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 3 additions and 47 deletions

View file

@ -36,15 +36,4 @@ describe('sendMessage()', () => {
expect.anything()
);
});
it('throws if template is missing', async () => {
const connector = await createConnector({ getConfig });
await expect(
connector.sendMessage({
to: 'to@email.com',
type: VerificationCodeType.Test,
payload: { code: '1234' },
})
).rejects.toThrow();
});
});

View file

@ -73,15 +73,4 @@ describe('sendMessage()', () => {
mockedConnectorConfig.accessKeySecret
);
});
it('throws if template is missing', async () => {
const connector = await createConnector({ getConfig });
await expect(
connector.sendMessage({
to: phoneTest,
type: VerificationCodeType.Test,
payload: { code: codeTest },
})
).rejects.toThrow();
});
});

View file

@ -53,15 +53,4 @@ describe('sendMessage()', () => {
})
);
});
it('throws if template is missing', async () => {
const connector = await createConnector({ getConfig });
await expect(
connector.sendMessage({
to: 'to@email.com',
type: VerificationCodeType.Test,
payload: { code: '1234' },
})
).rejects.toThrow();
});
});

View file

@ -26,7 +26,7 @@ export const mockedConfig: SendGridMailConfig = {
fromEmail: 'noreply@logto.test.io',
templates: [
{
usageType: 'Test',
usageType: 'Generic',
type: ContextType.Text,
subject: 'Logto Test Template',
content: 'This is for testing purposes only. Your verification code is {{code}}.',

View file

@ -10,7 +10,7 @@ export const mockedConfig: SmsAeroConfig = {
senderName: mockedSenderName,
templates: [
{
usageType: 'Test',
usageType: 'Generic',
content: 'This is for testing purposes only. Your verification code is {{code}}.',
},
],

View file

@ -63,15 +63,4 @@ describe('sendMessage()', () => {
})
);
});
it('throws if template is missing', async () => {
const connector = await createConnector({ getConfig });
await expect(
connector.sendMessage({
to: phoneTest,
type: VerificationCodeType.Test,
payload: { code: codeTest },
})
).rejects.toThrow();
});
});

View file

@ -10,7 +10,7 @@ export const mockedConfig: TwilioSmsConfig = {
fromMessagingServiceSID: mockedFromMessagingServiceSID,
templates: [
{
usageType: 'Test',
usageType: 'Generic',
content: 'This is for testing purposes only. Your verification code is {{code}}.',
},
],