mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
a85f5fae35
no issue - fix lint errors in lib/gh-koenig - fix ghost:base eslint errors - update ember plugin refs, remove ember-suave plugin refs - remove old jshint refs - add `lint:js` script - switch to `eslint-plugin-ghost` extending `plugin:ghost/ember`
32 lines
810 B
JavaScript
32 lines
810 B
JavaScript
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;
|
|
});
|
|
});
|