mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
- 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
18 lines
548 B
JavaScript
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']);
|
|
});
|
|
});
|