1
0
Fork 0
mirror of synced 2024-09-28 07:11:40 +12:00

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

View file

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