Removing test case that isn't valid anymore.

This commit is contained in:
mike12345567 2021-04-14 17:27:58 +01:00
parent 3810cc7483
commit 20a16e07a1
2 changed files with 1 additions and 11 deletions

View File

@ -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")

View File

@ -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)