mirror of
https://github.com/status-im/consul.git
synced 2025-01-09 13:26:07 +00:00
6c240fbf2d
* Add some less fake API data * Rename the models class so as to not be confused with JS Proxies * Rearrange routlets slightly and add some initial outletFor tests * Move away from a MeshChecks computed property and just use a helper * Just use ServiceChecks for healthiness filtering for the moment * Make TProxy cookie configurable * Amend exposed paths and upstreams so they know about meta AND proxy * Slight bit of TaggedAddresses refactor while I was checking for `meta` etc * Document CONSUL_TPROXY_ENABLE
33 lines
892 B
JavaScript
33 lines
892 B
JavaScript
import { moduleFor, test } from 'ember-qunit';
|
|
moduleFor('service:routlet', 'Integration | Routlet', {
|
|
// Specify the other units that are required for this test.
|
|
integration: true,
|
|
});
|
|
test('outletFor works', function(assert) {
|
|
const routlet = this.subject();
|
|
routlet.addOutlet('application', {
|
|
name: 'application'
|
|
});
|
|
routlet.addRoute('dc', {});
|
|
routlet.addOutlet('dc', {
|
|
name: 'dc'
|
|
});
|
|
routlet.addRoute('dc.services', {});
|
|
routlet.addOutlet('dc.services', {
|
|
name: 'dc.services'
|
|
});
|
|
routlet.addRoute('dc.services.instances', {});
|
|
|
|
let actual = routlet.outletFor('dc.services');
|
|
let expected = 'dc';
|
|
assert.equal(actual.name, expected);
|
|
|
|
actual = routlet.outletFor('dc');
|
|
expected = 'application';
|
|
assert.equal(actual.name, expected);
|
|
|
|
actual = routlet.outletFor('application');
|
|
expected = undefined;
|
|
assert.equal(actual, expected);
|
|
});
|