mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 15:12:58 +03:00
e74e2e039e
no issue - switch `jscs` and `jshint` inline config to `eslint` config - fix eslint errors, predominantly in tests where the config now the main app config more closely
34 lines
935 B
JavaScript
34 lines
935 B
JavaScript
/* jshint expr:true */
|
|
import {expect} from 'chai';
|
|
import {
|
|
describeComponent,
|
|
it
|
|
}
|
|
from 'ember-mocha';
|
|
import sinon from 'sinon';
|
|
|
|
describeComponent(
|
|
'gh-alert',
|
|
'Unit: Component: gh-alert',
|
|
{
|
|
unit: true
|
|
// specify the other units that are required for this test
|
|
// needs: ['component:foo', 'helper:bar']
|
|
},
|
|
function () {
|
|
it('closes notification through notifications service', function () {
|
|
let component = this.subject();
|
|
let notifications = {};
|
|
let notification = {message: 'Test close', type: 'success'};
|
|
|
|
notifications.closeNotification = sinon.spy();
|
|
component.set('notifications', notifications);
|
|
component.set('message', notification);
|
|
|
|
this.$().find('button').click();
|
|
|
|
expect(notifications.closeNotification.calledWith(notification)).to.be.true;
|
|
});
|
|
}
|
|
);
|