]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: add missing parameter type and related test
authorTatjana Dehler <tdehler@suse.com>
Wed, 22 Aug 2018 11:03:28 +0000 (13:03 +0200)
committerTatjana Dehler <tdehler@suse.com>
Tue, 9 Oct 2018 12:50:53 +0000 (14:50 +0200)
Added missing parameter type and a test for this service method.

Signed-off-by: Tatjana Dehler <tdehler@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/api/configuration.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/configuration.service.ts

index 56a842a741bfd9b631407432e5707f2c48b371ab..1cafe25f70b7052c9a79ac41d79f881847d65b29 100644 (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');
+  });
 });
index dfc68eba2da9a6ca140ad2fff911e1902cf5ce50..eda79334e5427683c5836960e746fcf165b70104 100644 (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}`);
   }
 }