Fix tests
parent
b41461c8a3
commit
8c4d1fa199
|
@ -9,6 +9,14 @@ test.before(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[Success] Create a customer', async t => {
|
test('[Success] Create a customer', async t => {
|
||||||
|
// Login
|
||||||
|
await g.request
|
||||||
|
.post('/admin/login_action')
|
||||||
|
.send({
|
||||||
|
email: g.users[0].userEmail,
|
||||||
|
password: 'test'
|
||||||
|
});
|
||||||
|
|
||||||
const customer = {
|
const customer = {
|
||||||
email: 'sarah.jones@test.com',
|
email: 'sarah.jones@test.com',
|
||||||
firstName: 'Sarah',
|
firstName: 'Sarah',
|
||||||
|
@ -31,6 +39,14 @@ test('[Success] Create a customer', async t => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test('[Fail] Try create a duplicate customer', async t => {
|
test('[Fail] Try create a duplicate customer', async t => {
|
||||||
|
// Login
|
||||||
|
await g.request
|
||||||
|
.post('/admin/login_action')
|
||||||
|
.send({
|
||||||
|
email: g.users[0].userEmail,
|
||||||
|
password: 'test'
|
||||||
|
});
|
||||||
|
|
||||||
const customer = {
|
const customer = {
|
||||||
email: 'sarah.jones@test.com',
|
email: 'sarah.jones@test.com',
|
||||||
firstName: 'Sarah',
|
firstName: 'Sarah',
|
||||||
|
|
Loading…
Reference in New Issue