Skip to content
Snippets Groups Projects
Commit a575cf54 authored by Etienne LOUPIAS's avatar Etienne LOUPIAS
Browse files

Merge branch '304-formulaire-de-contact-bug' into 'dev'

Resolve "[Formulaire de Contact] - Bug"

See merge request !292
parents 96de5621 e208b003
No related branches found
No related tags found
2 merge requests!294V2.3.0,!292Resolve "[Formulaire de Contact] - Bug"
...@@ -41,7 +41,7 @@ describe('MailerService', () => { ...@@ -41,7 +41,7 @@ describe('MailerService', () => {
config: {}, config: {},
}; };
jest.spyOn(httpService, 'post').mockImplementationOnce(() => of(result)); jest.spyOn(httpService, 'post').mockImplementationOnce(() => of(result));
expect(await service.send('a@a.com', 'test', '<p>This is a test</p>')).toBe(result); expect(await service.send('a@a.com', 'test', '<p>This is a test</p>')).toBe(result.data);
}); });
it('should not send email', async () => { it('should not send email', async () => {
......
...@@ -38,7 +38,7 @@ export class MailerService { ...@@ -38,7 +38,7 @@ export class MailerService {
.subscribe( .subscribe(
(body) => { (body) => {
Logger.log(`Send mail - success : ${subject}`, 'Mailer'); Logger.log(`Send mail - success : ${subject}`, 'Mailer');
return resolve(body); return resolve(body.data);
}, },
(err) => { (err) => {
Logger.error(err, 'Mailer'); Logger.error(err, 'Mailer');
......
...@@ -162,7 +162,7 @@ describe('JobsService', () => { ...@@ -162,7 +162,7 @@ describe('JobsService', () => {
config: {}, config: {},
}; };
jest.spyOn(httpService, 'post').mockImplementationOnce(() => of(result)); jest.spyOn(httpService, 'post').mockImplementationOnce(() => of(result));
expect(await mailer.send('a@a.com', 'test', '<p>This is a test</p>')).toBe(result); expect(await mailer.send('a@a.com', 'test', '<p>This is a test</p>')).toBe(result.data);
}); });
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment