mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 15:12:58 +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
40 lines
889 B
JavaScript
40 lines
889 B
JavaScript
/* jshint expr:true */
|
|
import Ember from 'ember';
|
|
import {expect} from 'chai';
|
|
import {
|
|
describeComponent,
|
|
it
|
|
} from 'ember-mocha';
|
|
|
|
const {run} = Ember;
|
|
|
|
describeComponent(
|
|
'gh-navitem-url-input',
|
|
'Unit: Component: gh-navitem-url-input',
|
|
{
|
|
unit: true
|
|
},
|
|
function () {
|
|
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;
|
|
});
|
|
}
|
|
);
|