mirror of
https://github.com/status-im/consul.git
synced 2025-01-24 20:51:10 +00:00
12811c0844
* Add some tests to check the correct GET API endpoints are called * Refactor adapters 1. Add integration tests for `urlFor...` and majority `handleResponse` methods 2. Refactor out `handleResponse` a little more into single/batch/boolean methods 3. Move setting of the `Datacenter` property into the `handleResponse` method, basically the same place that the uid is being set using the dc parsed form the URL 4. Add some Errors for if you don't pass ids to certain `urlFor` methods
12 lines
418 B
JavaScript
12 lines
418 B
JavaScript
import { module, test } from 'qunit';
|
|
import { setupTest } from 'ember-qunit';
|
|
module('Integration | Adapter | dc | url', function(hooks) {
|
|
setupTest(hooks);
|
|
test('urlForFindAll returns the correct url', function(assert) {
|
|
const adapter = this.owner.lookup('adapter:dc');
|
|
const expected = `/v1/catalog/datacenters`;
|
|
const actual = adapter.urlForFindAll();
|
|
assert.equal(actual, expected);
|
|
});
|
|
});
|