mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
Remove role min limit to make test functional
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
This commit is contained in:
parent
9ecd81a122
commit
2d55f281da
@ -9,7 +9,7 @@ const createUser = data => {
|
|||||||
url: '/admin/users',
|
url: '/admin/users',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: {
|
body: {
|
||||||
roles: ['41224d776a326fb40f000001'],
|
roles: [],
|
||||||
...data,
|
...data,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@ -286,8 +286,6 @@ describe('Admin Auth End to End', () => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(res.body.data);
|
|
||||||
|
|
||||||
expect(res.statusCode).toBe(400);
|
expect(res.statusCode).toBe(400);
|
||||||
expect(res.body).toEqual({
|
expect(res.body).toEqual({
|
||||||
statusCode: 400,
|
statusCode: 400,
|
||||||
|
@ -19,10 +19,7 @@ const userCreationSchema = yup
|
|||||||
.string()
|
.string()
|
||||||
.min(1)
|
.min(1)
|
||||||
.required(),
|
.required(),
|
||||||
roles: yup
|
roles: yup.array(), // FIXME: set min to 1 once the create role API is created,
|
||||||
.array()
|
|
||||||
.min(1)
|
|
||||||
.required(),
|
|
||||||
})
|
})
|
||||||
.noUnknown();
|
.noUnknown();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user