Ghost/ghost/admin/tests/unit/components/gh-navitem-url-input-test.js
Kevin Ansfield 983110d931 Switched from ember-cli-shims to new module imports (#779)
no issue

- add eslint-plugin-ember, configure no-old-shims rule
- run `eslint --fix` on `app`, `lib`, `mirage`, and `tests` to move imports to the new module imports
- further cleanup of Ember globals usage
- remove event-dispatcher initializer now that `canDispatchToEventManager` is deprecated
2017-08-22 14:53:26 +07:00

33 lines
833 B
JavaScript

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