0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/tests/unit/components/gh-navitem-url-input-test.js
Kevin Ansfield 739443bb72 Standardize ember test names and file names
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: []`
2015-10-06 17:31:03 +01:00

36 lines
854 B
JavaScript

/* jshint expr:true */
import Ember from 'ember';
import {expect} from 'chai';
import {
describeComponent,
it
} from 'ember-mocha';
describeComponent(
'gh-navitem-url-input',
'Unit: Component: gh-navitem-url-input',
{
unit: true
},
function () {
it('identifies a URL as the base URL', function () {
var component = this.subject({
baseUrl: 'http://example.com/'
});
this.render();
Ember.run(function () {
component.set('value', 'http://example.com/');
});
expect(component.get('isBaseUrl')).to.be.ok;
Ember.run(function () {
component.set('value', 'http://example.com/go/');
});
expect(component.get('isBaseUrl')).to.not.be.ok;
});
}
);