mirror of
https://github.com/strapi/strapi.git
synced 2025-08-31 12:23:05 +00:00
fix: prettier issue
This commit is contained in:
parent
3959062d73
commit
f4fb74d10c
@ -115,8 +115,10 @@ module.exports = ({ strapi }) => ({
|
||||
}
|
||||
|
||||
const validations = strapi.config.get('plugin::users-permissions.validationRules');
|
||||
|
||||
const { currentPassword, password } = await validateChangePasswordBody(validations)(ctx.request.body);
|
||||
|
||||
const { currentPassword, password } = await validateChangePasswordBody(validations)(
|
||||
ctx.request.body
|
||||
);
|
||||
|
||||
const user = await strapi.db
|
||||
.query('plugin::users-permissions.user')
|
||||
@ -321,7 +323,7 @@ module.exports = ({ strapi }) => ({
|
||||
|
||||
const validations = strapi.config.get('plugin::users-permissions.validationRules');
|
||||
|
||||
await validateRegisterBody(validations)(params)
|
||||
await validateRegisterBody(validations)(params);
|
||||
|
||||
const role = await strapi.db
|
||||
.query('plugin::users-permissions.role')
|
||||
|
@ -91,7 +91,7 @@ describe('user-permissions auth', () => {
|
||||
},
|
||||
send: jest.fn(),
|
||||
};
|
||||
const authorization = auth({ strapi: global.strapi })
|
||||
const authorization = auth({ strapi: global.strapi });
|
||||
await authorization.register(ctx);
|
||||
expect(ctx.send).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
@ -124,7 +124,7 @@ describe('user-permissions auth', () => {
|
||||
},
|
||||
send: jest.fn(),
|
||||
};
|
||||
const authorization = auth({ strapi: global.strapi })
|
||||
const authorization = auth({ strapi: global.strapi });
|
||||
await expect(authorization.register(ctx)).rejects.toThrow(errors.ValidationError);
|
||||
expect(ctx.send).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
@ -157,7 +157,7 @@ describe('user-permissions auth', () => {
|
||||
},
|
||||
send: jest.fn(),
|
||||
};
|
||||
const authorization = auth({ strapi: global.strapi })
|
||||
const authorization = auth({ strapi: global.strapi });
|
||||
await expect(authorization.register(ctx)).rejects.toThrow(errors.ValidationError);
|
||||
expect(ctx.send).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
@ -190,7 +190,7 @@ describe('user-permissions auth', () => {
|
||||
},
|
||||
send: jest.fn(),
|
||||
};
|
||||
const authorization = auth({ strapi: global.strapi })
|
||||
const authorization = auth({ strapi: global.strapi });
|
||||
await authorization.register(ctx);
|
||||
expect(ctx.send).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
@ -222,7 +222,7 @@ describe('user-permissions auth', () => {
|
||||
},
|
||||
send: jest.fn(),
|
||||
};
|
||||
const authorization = auth({ strapi: global.strapi })
|
||||
const authorization = auth({ strapi: global.strapi });
|
||||
await expect(authorization.register(ctx)).rejects.toThrow(errors.ValidationError);
|
||||
expect(ctx.send).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
@ -232,12 +232,12 @@ describe('user-permissions auth', () => {
|
||||
...mockStrapi,
|
||||
config: {
|
||||
get: jest.fn((path) => {
|
||||
if (path === 'plugin::users-permissions.validationRules'){
|
||||
if (path === 'plugin::users-permissions.validationRules') {
|
||||
return {
|
||||
password:{
|
||||
min:1,
|
||||
}
|
||||
}
|
||||
password: {
|
||||
min: 1,
|
||||
},
|
||||
};
|
||||
}
|
||||
return {
|
||||
register: {
|
||||
@ -261,8 +261,8 @@ describe('user-permissions auth', () => {
|
||||
},
|
||||
send: jest.fn(),
|
||||
};
|
||||
const authorization = auth({ strapi: global.strapi })
|
||||
await authorization.register(ctx)
|
||||
const authorization = auth({ strapi: global.strapi });
|
||||
await authorization.register(ctx);
|
||||
expect(ctx.send).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user