2018-09-25 16:28:26 +00:00
|
|
|
import { module, test } from 'qunit';
|
|
|
|
import { setupTest } from 'ember-qunit';
|
2018-05-25 20:33:22 +00:00
|
|
|
|
2021-12-17 03:44:29 +00:00
|
|
|
module('Unit | Adapter | console', function (hooks) {
|
2018-09-25 16:28:26 +00:00
|
|
|
setupTest(hooks);
|
2018-05-25 20:33:22 +00:00
|
|
|
|
2021-12-17 03:44:29 +00:00
|
|
|
test('it builds the correct URL', function (assert) {
|
2018-09-25 16:28:26 +00:00
|
|
|
let adapter = this.owner.lookup('adapter:console');
|
|
|
|
let sysPath = 'sys/health';
|
|
|
|
let awsPath = 'aws/roles/my-other-role';
|
|
|
|
assert.equal(adapter.buildURL(sysPath), '/v1/sys/health');
|
|
|
|
assert.equal(adapter.buildURL(awsPath), '/v1/aws/roles/my-other-role');
|
|
|
|
});
|
2018-05-25 20:33:22 +00:00
|
|
|
});
|