mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
739443bb72
no issue - standardize on "{TestType}: {ModuleType}: {module-name}" for test description strings - standardize on `{module-name}-test.js` for test file names - fix deprecation notices for ember component unit tests without explicit `unit: test` or `needs: []`
23 lines
623 B
JavaScript
23 lines
623 B
JavaScript
import Ember from 'ember';
|
|
import {
|
|
describeModel,
|
|
it
|
|
} from 'ember-mocha';
|
|
|
|
describeModel('role', 'Unit: Model: role', function () {
|
|
it('provides a lowercase version of the name', function () {
|
|
var model = this.subject({
|
|
name: 'Author'
|
|
});
|
|
|
|
expect(model.get('name')).to.equal('Author');
|
|
expect(model.get('lowerCaseName')).to.equal('author');
|
|
|
|
Ember.run(function () {
|
|
model.set('name', 'Editor');
|
|
|
|
expect(model.get('name')).to.equal('Editor');
|
|
expect(model.get('lowerCaseName')).to.equal('editor');
|
|
});
|
|
});
|
|
});
|