Ghost/ghost/admin/tests/unit/mixins/validation-engine-test.js
Kevin Ansfield 5b17a70e8b Update dependency eslint-plugin-ghost to v1.4.0
no issue

- applies fixes for new/updated rules
- disables `ember/no-mixins` rule as we're not able to migrate away yet
2020-05-06 18:07:01 +01:00

35 lines
1.1 KiB
JavaScript

// import {expect} from 'chai';
import {
describe,
it
} from 'mocha';
// import EmberObject from 'ember-object';
// import ValidationEngineMixin from 'ghost-admin/mixins/validation-engine';
describe('ValidationEngineMixin', function () {
describe('#validate', function () {
it('loads the correct validator');
it('rejects if the validator doesn\'t exist');
it('resolves with valid object');
it('rejects with invalid object');
it('clears all existing errors');
describe('with a specified property', function () {
it('resolves with valid property');
it('rejects with invalid property');
it('adds property to hasValidated array');
it('clears existing error on specified property');
});
it('handles a passed in model');
it('uses this.model if available');
});
describe('#save', function () {
it('calls validate');
it('rejects with validation errors');
it('calls object\'s #save if validation passes');
it('skips validation if it\'s a deletion');
});
});