import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
import { PerformanceCounterModule } from '~/app/ceph/performance-counter/performance-counter.module';
+import { RgwDaemon } from '~/app/ceph/rgw/models/rgw-daemon';
import { SharedModule } from '~/app/shared/shared.module';
import { configureTestBed } from '~/testing/unit-test-helper';
import { RgwDaemonDetailsComponent } from './rgw-daemon-details.component';
it('should create', () => {
expect(component).toBeTruthy();
});
+
+ it('should set service id and service map id on changes', () => {
+ const daemon = new RgwDaemon();
+ daemon.id = 'daemon1';
+ daemon.service_map_id = '4832';
+ component.selection = daemon;
+ component.ngOnChanges();
+
+ expect(component.serviceId).toBe(daemon.id);
+ expect(component.serviceMapId).toBe(daemon.service_map_id);
+ });
});