Fix tests

master
Mark Moffat 2019-11-09 13:34:35 +10:30
parent b41461c8a3
commit 8c4d1fa199
1 changed files with 16 additions and 0 deletions

View File

@ -9,6 +9,14 @@ test.before(async () => {
});
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 = {
email: 'sarah.jones@test.com',
firstName: 'Sarah',
@ -31,6 +39,14 @@ test('[Success] Create a 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 = {
email: 'sarah.jones@test.com',
firstName: 'Sarah',