mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-20 01:03:23 +03:00
2f4f6db133
no issue - add ember-suave dependency - upgrade grunt-jscs dependency - add a new .jscsrc for the client's tests directory that extends from client's base .jscsrc - separate client tests in Gruntfile jscs task so they pick up the test's .jscsrc - standardize es6 usage across client
26 lines
641 B
JavaScript
26 lines
641 B
JavaScript
import Ember from 'ember';
|
|
import {
|
|
describeModel,
|
|
it
|
|
} from 'ember-mocha';
|
|
|
|
const {run} = Ember;
|
|
|
|
describeModel('role', 'Unit: Model: role', function () {
|
|
it('provides a lowercase version of the name', function () {
|
|
const model = this.subject({
|
|
name: 'Author'
|
|
});
|
|
|
|
expect(model.get('name')).to.equal('Author');
|
|
expect(model.get('lowerCaseName')).to.equal('author');
|
|
|
|
run(function () {
|
|
model.set('name', 'Editor');
|
|
|
|
expect(model.get('name')).to.equal('Editor');
|
|
expect(model.get('lowerCaseName')).to.equal('editor');
|
|
});
|
|
});
|
|
});
|