]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-site.service.spec.ts
d/control: depend on python3-yaml for ceph-mgr
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / api / rgw-site.service.spec.ts
CommitLineData
9f95a23c
TL
1import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
2import { TestBed } from '@angular/core/testing';
3
4import { configureTestBed } from '../../../testing/unit-test-helper';
5import { RgwSiteService } from './rgw-site.service';
6
7describe('RgwSiteService', () => {
8 let service: RgwSiteService;
9 let httpTesting: HttpTestingController;
10
11 configureTestBed({
12 providers: [RgwSiteService],
13 imports: [HttpClientTestingModule]
14 });
15
16 beforeEach(() => {
17 service = TestBed.get(RgwSiteService);
18 httpTesting = TestBed.get(HttpTestingController);
19 });
20
21 afterEach(() => {
22 httpTesting.verify();
23 });
24
25 it('should be created', () => {
26 expect(service).toBeTruthy();
27 });
28
29 it('should call getPlacementTargets', () => {
30 service.getPlacementTargets().subscribe();
31 const req = httpTesting.expectOne('api/rgw/site?query=placement-targets');
32 expect(req.request.method).toBe('GET');
33 });
34});