Files
dashtab/tests/unit/services/authorization-test.js

25 lines
721 B
JavaScript

import { module, test } from 'qunit';
import { setupTest } from 'dashtab/tests/helpers';
module('Unit | Service | authorization', function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
const service = this.owner.lookup('service:authorization');
assert.ok(service);
});
test('rejects an unsupported integration type', async function (assert) {
const service = this.owner.lookup('service:authorization');
await assert.rejects(
service.start('unknown', 'https://example.com'),
/Unsupported integration type/
);
await assert.rejects(
service.completeWebCallback('unknown', 'https://example.com'),
/Unsupported integration type/
);
});
});