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 { roleId } = ctx.request.body
|
||||||
const email = ctx.request.body.email || ctx.user.email
|
const email = ctx.request.body.email || ctx.user.email
|
||||||
|
|
||||||
if (!email) {
|
|
||||||
ctx.throw(400, "Require email to manage user")
|
|
||||||
}
|
|
||||||
|
|
||||||
// check role valid
|
// check role valid
|
||||||
const role = await getRole(appId, roleId)
|
const role = await getRole(appId, roleId)
|
||||||
if (!role) ctx.throw(400, "Invalid Role")
|
if (!role) ctx.throw(400, "Invalid Role")
|
||||||
|
|
|
@ -106,12 +106,6 @@ describe("/users", () => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
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 () => {
|
it("should error if no role provided", async () => {
|
||||||
const user = basicUser(null)
|
const user = basicUser(null)
|
||||||
await create(user, 400)
|
await create(user, 400)
|
||||||
|
|
Loading…
Reference in New Issue