From: Tatjana Dehler Date: Wed, 22 Aug 2018 11:03:28 +0000 (+0200) Subject: mgr/dashboard: add missing parameter type and related test X-Git-Tag: v14.0.1~99^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=724e3cb7095c7c0fa88e32c4c704a0958ae7ab7d;p=ceph.git 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 --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/configuration.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/configuration.service.spec.ts index 56a842a741b..1cafe25f70b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/configuration.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/configuration.service.spec.ts @@ -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'); + }); }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/configuration.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/configuration.service.ts index dfc68eba2da..eda79334e54 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/configuration.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/configuration.service.ts @@ -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}`); } }