Remove role min limit to make test functional

Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
This commit is contained in:
Alexandre Bodin 2020-05-18 20:49:11 +02:00
parent 9ecd81a122
commit 2d55f281da
2 changed files with 2 additions and 7 deletions

View File

@ -9,7 +9,7 @@ const createUser = data => {
url: '/admin/users',
method: 'POST',
body: {
roles: ['41224d776a326fb40f000001'],
roles: [],
...data,
},
});
@ -286,8 +286,6 @@ describe('Admin Auth End to End', () => {
},
});
console.log(res.body.data);
expect(res.statusCode).toBe(400);
expect(res.body).toEqual({
statusCode: 400,

View File

@ -19,10 +19,7 @@ const userCreationSchema = yup
.string()
.min(1)
.required(),
roles: yup
.array()
.min(1)
.required(),
roles: yup.array(), // FIXME: set min to 1 once the create role API is created,
})
.noUnknown();