1
0
mirror of https://github.com/ceph/ceph synced 2025-02-19 08:57:27 +00:00

mgr/dashboard: add missing parameter type and related test

Added missing parameter type and a test for this service method.

Signed-off-by: Tatjana Dehler <tdehler@suse.com>
This commit is contained in:
Tatjana Dehler 2018-08-22 13:03:28 +02:00
parent b952a0df11
commit 724e3cb709
2 changed files with 7 additions and 1 deletions
src/pybind/mgr/dashboard/frontend/src/app/shared/api

View File

@ -31,4 +31,10 @@ describe('ConfigurationService', () => {
const req = httpTesting.expectOne('api/cluster_conf/');
expect(req.request.method).toBe('GET');
});
it('should call get', () => {
service.get('configOption').subscribe();
const req = httpTesting.expectOne('api/cluster_conf/configOption');
expect(req.request.method).toBe('GET');
});
});

View File

@ -13,7 +13,7 @@ export class ConfigurationService {
return this.http.get('api/cluster_conf/');
}
get(configOption) {
get(configOption: string) {
return this.http.get(`api/cluster_conf/${configOption}`);
}
}