From d928c260bb97121f7a1dc9c9f98b8fbd2dfa42ba Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Fri, 23 Jul 2021 21:24:36 -0600 Subject: [PATCH] =?UTF-8?q?eliminar=20test=20dado=20que=20prueba=20una=20f?= =?UTF-8?q?uncionalidad=20que=20ya=20no=20est=C3=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../encuesta-delete-dialog.component.spec.ts | 65 ------------------- 1 file changed, 65 deletions(-) delete mode 100644 src/main/webapp/app/entities/encuesta/delete/encuesta-delete-dialog.component.spec.ts diff --git a/src/main/webapp/app/entities/encuesta/delete/encuesta-delete-dialog.component.spec.ts b/src/main/webapp/app/entities/encuesta/delete/encuesta-delete-dialog.component.spec.ts deleted file mode 100644 index cee92bc..0000000 --- a/src/main/webapp/app/entities/encuesta/delete/encuesta-delete-dialog.component.spec.ts +++ /dev/null @@ -1,65 +0,0 @@ -jest.mock('@ng-bootstrap/ng-bootstrap'); - -import { ComponentFixture, TestBed, inject, fakeAsync, tick } from '@angular/core/testing'; -import { HttpResponse } from '@angular/common/http'; -import { HttpClientTestingModule } from '@angular/common/http/testing'; -import { of } from 'rxjs'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; - -import { EncuestaService } from '../service/encuesta.service'; - -import { EncuestaDeleteDialogComponent } from './encuesta-delete-dialog.component'; - -describe('Component Tests', () => { - describe('Encuesta Management Delete Component', () => { - let comp: EncuestaDeleteDialogComponent; - let fixture: ComponentFixture; - let service: EncuestaService; - let mockActiveModal: NgbActiveModal; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HttpClientTestingModule], - declarations: [EncuestaDeleteDialogComponent], - providers: [NgbActiveModal], - }) - .overrideTemplate(EncuestaDeleteDialogComponent, '') - .compileComponents(); - fixture = TestBed.createComponent(EncuestaDeleteDialogComponent); - comp = fixture.componentInstance; - service = TestBed.inject(EncuestaService); - mockActiveModal = TestBed.inject(NgbActiveModal); - }); - - describe('confirmDelete', () => { - it('Should call delete service on confirmDelete', inject( - [], - fakeAsync(() => { - // GIVEN - jest.spyOn(service, 'delete').mockReturnValue(of(new HttpResponse({}))); - - // WHEN - comp.confirmDelete(123); - tick(); - - // THEN - expect(service.delete).toHaveBeenCalledWith(123); - expect(mockActiveModal.close).toHaveBeenCalledWith('deleted'); - }) - )); - - it('Should not call delete service on clear', () => { - // GIVEN - jest.spyOn(service, 'delete'); - - // WHEN - comp.cancel(); - - // THEN - expect(service.delete).not.toHaveBeenCalled(); - expect(mockActiveModal.close).not.toHaveBeenCalled(); - expect(mockActiveModal.dismiss).toHaveBeenCalled(); - }); - }); - }); -});