Updated selfservice tests to prevent email duplication

ref #197
This commit is contained in:
2023-02-02 11:14:48 +01:00
parent e184673963
commit 9bc80aac8a
3 changed files with 34 additions and 11 deletions

View File

@@ -1,3 +1,4 @@
import { faker } from '@faker-js/faker';
import axios from 'axios';
import { config } from '../../config';
const base = "http://localhost:" + config.internal_port
@@ -30,7 +31,7 @@ describe('register + get should return 200', () => {
"firstname": "string",
"middlename": "string",
"lastname": "string",
"email": "user@example.com"
"email": faker.internet.exampleEmail(),
}, axios_config);
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json");