0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00
ghost/test/unit/data/validation/index_spec.js
Hannah Wolfe 4e49aeb9a0
Moved password validation into a library
- This is super specific code relating only to validating passwords.
- It's needed as a shared validator as we use other funnels to help people setup Ghost on Pro, but currently it's hard-baked into Ghost
- It's also not the greatest code. It'd be nice to be able to rework it and know that would automatically update everywhere passwords are set
2021-06-15 12:33:14 +01:00

18 lines
548 B
JavaScript

const should = require('should');
const validation = require('../../../../core/server/data/validation');
// Validate our customizations
describe('Validation', function () {
it('should export our required functions', function () {
should.exist(validation);
validation.should.have.properties(
['validate', 'validator']
);
validation.validate.should.be.a.Function();
validation.validator.should.have.properties(['empty', 'notContains', 'isTimezone', 'isEmptyOrURL', 'isSlug']);
});
});