mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
d53ef125e0
no issue - updates `package.json` details to better reflect the separation from the `Ghost` package - update ember config and all import statements to reflect the new `ghost-admin` module name in `package.json`
43 lines
1.4 KiB
JavaScript
43 lines
1.4 KiB
JavaScript
/* jshint expr:true */
|
|
import { expect } from 'chai';
|
|
import {
|
|
describe,
|
|
it
|
|
} from 'mocha';
|
|
import Ember from 'ember';
|
|
import ValidationEngineMixin from 'ghost-admin/mixins/validation-engine';
|
|
|
|
describe('ValidationEngineMixin', function () {
|
|
// Replace this with your real tests.
|
|
// it('works', function () {
|
|
// var ValidationEngineObject = Ember.Object.extend(ValidationEngineMixin);
|
|
// var subject = ValidationEngineObject.create();
|
|
// expect(subject).to.be.ok;
|
|
// });
|
|
|
|
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');
|
|
});
|
|
});
|