You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/ui-v2/tests/integration/serializers/dc-test.js

22 lines
736 B

import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import { get } from 'consul-ui/tests/helpers/api';
module('Integration | Serializer | dc', function(hooks) {
setupTest(hooks);
test('respondForFindAll returns the correct data for list endpoint', function(assert) {
const serializer = this.owner.lookup('serializer:dc');
const request = {
url: `/v1/catalog/datacenters`,
};
return get(request.url).then(function(payload) {
const expected = payload;
const actual = serializer.respondForFindAll(function(cb) {
const headers = {};
const body = payload;
return cb(headers, body);
});
assert.deepEqual(actual, expected);
});
});
});