describe('PUT', () => {
it('should execute PUT', () => {
service.put('/testing', {}).subscribe(res => {
expect(res).toBeTruthy();
});
const req = httpMock.expectOne(environment.apiEndpoint + '/testing')
expect(req.request.method).toBe('PUT');
});
});
describe('DELETE', () => {
it('should execute DELETE', () => {
service.delete('/testing', {}).subscribe(res => {
expect(res).toBeTruthy();
});
const req = httpMock.expectOne(environment.apiEndpoint + '/testing')
expect(req.request.method).toBe('DELETE');
});
});```
¿Quieres ver más aportes, preguntas y respuestas de la comunidad?
o inicia sesión.