Removing test case that isn't valid anymore.
This commit is contained in:
parent
3810cc7483
commit
20a16e07a1
|
@ -45,10 +45,6 @@ exports.createMetadata = async function(ctx) {
|
|||
const { roleId } = ctx.request.body
|
||||
const email = ctx.request.body.email || ctx.user.email
|
||||
|
||||
if (!email) {
|
||||
ctx.throw(400, "Require email to manage user")
|
||||
}
|
||||
|
||||
// check role valid
|
||||
const role = await getRole(appId, roleId)
|
||||
if (!role) ctx.throw(400, "Invalid Role")
|
||||
|
|
|
@ -105,13 +105,7 @@ describe("/users", () => {
|
|||
failRole: BUILTIN_ROLE_IDS.PUBLIC,
|
||||
})
|
||||
})
|
||||
|
||||
it("should error if no email provided", async () => {
|
||||
const user = basicUser(BUILTIN_ROLE_IDS.POWER)
|
||||
delete user.email
|
||||
await create(user, 400)
|
||||
})
|
||||
|
||||
|
||||
it("should error if no role provided", async () => {
|
||||
const user = basicUser(null)
|
||||
await create(user, 400)
|
||||
|
|
Loading…
Reference in New Issue