}
configureTestBed({
- declarations: [ RgwUserFormComponent ],
- imports: [
- HttpClientTestingModule,
- ReactiveFormsModule,
- RouterTestingModule,
- SharedModule
- ],
- providers: [
- BsModalService,
- { provide: RgwUserService, useClass: MockRgwUserService }
- ]
+ declarations: [RgwUserFormComponent],
+ imports: [HttpClientTestingModule, ReactiveFormsModule, RouterTestingModule, SharedModule],
+ providers: [BsModalService, { provide: RgwUserService, useClass: MockRgwUserService }]
});
beforeEach(() => {
component.setS3Key(key);
expect(component.s3Keys.length).toBe(1);
expect(component.s3Keys[0].user).toBe('test1:subuser2');
- expect(rgwUserService.addS3Key).toHaveBeenCalledWith(
- 'test1', {
- subuser: 'subuser2',
- generate_key: 'false',
- access_key: undefined,
- secret_key: undefined
- }
- );
+ expect(rgwUserService.addS3Key).toHaveBeenCalledWith('test1', {
+ subuser: 'subuser2',
+ generate_key: 'false',
+ access_key: undefined,
+ secret_key: undefined
+ });
});
it('should set key w/o subuser', () => {
component.setS3Key(key);
expect(component.s3Keys.length).toBe(1);
expect(component.s3Keys[0].user).toBe('test1');
- expect(rgwUserService.addS3Key).toHaveBeenCalledWith(
- 'test1', {
- subuser: '',
- generate_key: 'false',
- access_key: undefined,
- secret_key: undefined
- }
- );
+ expect(rgwUserService.addS3Key).toHaveBeenCalledWith('test1', {
+ subuser: '',
+ generate_key: 'false',
+ access_key: undefined,
+ secret_key: undefined
+ });
});
});
let fixture: ComponentFixture<RgwUserSubuserModalComponent>;
configureTestBed({
- declarations: [ RgwUserSubuserModalComponent ],
- imports: [
- ReactiveFormsModule,
- SharedModule
- ],
- providers: [ BsModalRef ]
+ declarations: [RgwUserSubuserModalComponent],
+ imports: [ReactiveFormsModule, SharedModule],
+ providers: [BsModalRef]
});
beforeEach(() => {
it('should create', () => {
expect(component).toBeTruthy();
});
-
});
it('should get executing message for task', () => {
component._handleTasks(tasks.executing, []);
expect(component.executingTasks.length).toBe(1);
- expect(component.executingTasks[0].description).toBe('Deleting RBD \'somePool/someImage\'');
+ expect(component.executingTasks[0].description).toBe(`Deleting RBD 'somePool/someImage'`);
});
it('should get finished message for task', () => {
component._handleTasks([], tasks.finished);
expect(component.finishedTasks.length).toBe(2);
- expect(component.finishedTasks[0].description).toBe('Copy RBD \'somePool/someImage\'');
+ expect(component.finishedTasks[0].description).toBe(`Copy RBD 'somePool/someImage'`);
expect(component.finishedTasks[0].errorMessage).toBe(undefined);
- expect(component.finishedTasks[1].description).toBe('Clone RBD \'somePool/someImage\'');
+ expect(component.finishedTasks[1].description).toBe(`Clone RBD 'somePool/someImage'`);
expect(component.finishedTasks[1].errorMessage).toBe(
- 'Name \'somePool/someImage\' is already in use.'
+ `Name 'somePool/someImage' is already in use.`
);
});
data.push({
a: i,
b: i * i,
- c: [-(i % 10), 'score' + (i % 16 + 6)],
+ c: [-(i % 10), 'score' + ((i % 16) + 6)],
d: !(i % 2)
});
}
expect(router.url).toBe(urlResult);
};
- configureTestBed({
- imports: [RouterTestingModule.withRoutes(routes)],
- providers: [ModuleStatusGuardService, { provide: HttpClient, useValue: fakeService }],
- declarations: [FooComponent]
- }, true);
+ configureTestBed(
+ {
+ imports: [RouterTestingModule.withRoutes(routes)],
+ providers: [ModuleStatusGuardService, { provide: HttpClient, useValue: fakeService }],
+ declarations: [FooComponent]
+ },
+ true
+ );
beforeEach(() => {
service = TestBed.get(ModuleStatusGuardService);
filesystems: [{ id: 1, name: 'cephfs_a' }]
};
- configureTestBed({
- providers: [TaskManagerService, { provide: SummaryService, useValue: fakeService }]
- }, true);
+ configureTestBed(
+ {
+ providers: [TaskManagerService, { provide: SummaryService, useValue: fakeService }]
+ },
+ true
+ );
beforeEach(() => {
taskManagerService = TestBed.get(TaskManagerService);