]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/api/host.service.spec.ts
import 15.2.5
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / api / host.service.spec.ts
index 0f58cd098aff62433a5d97aceb69af524c7901e0..a98eb78bfaae8c6586e8995ffb703bf16e5cf7b5 100644 (file)
@@ -42,4 +42,11 @@ describe('HostService', () => {
     const req = httpTesting.expectOne(`api/host/${hostname}/devices`);
     expect(req.request.method).toBe('GET');
   });
+
+  it('should update host', fakeAsync(() => {
+    service.update('mon0', ['foo', 'bar']).subscribe();
+    const req = httpTesting.expectOne('api/host/mon0');
+    expect(req.request.method).toBe('PUT');
+    expect(req.request.body).toEqual({ labels: ['foo', 'bar'] });
+  }));
 });