2018-03-28 12:40:12 -07:00

45 lines
1.1 KiB
JavaScript

import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import notificationsStub from 'wherehows-web/tests/stubs/services/notifications';
import userStub from 'wherehows-web/tests/stubs/services/current-user';
import sinon from 'sinon';
moduleForComponent(
'datasets/containers/dataset-acl-access',
'Integration | Component | datasets/containers/dataset acl access',
{
integration: true,
beforeEach() {
this.register('service:current-user', userStub);
this.register('service:notifications', notificationsStub);
this.inject.service('current-user');
this.inject.service('notifications');
this.server = sinon.createFakeServer();
this.server.respondImmediately = true;
},
afterEach() {
this.server.restore();
}
}
);
test('it renders', function(assert) {
this.server.respondWith('GET', /\/api\/v2\/datasets.*/, [
200,
{ 'Content-Type': 'application/json' },
JSON.stringify({})
]);
this.render(hbs`{{datasets/containers/dataset-acl-access}}`);
assert.equal(
this.$()
.text()
.trim(),
''
);
});