Contenido del curso
Testing helpers
Pruebas a Fields
Pruebas a Forms
Pruebas a Validadores
Continua aplicando testing con Angular
Register Form
Contenido del curso
Register Form
Armando Rivera
EstudianteCarlos Alejandro Hernández Mejía
EstudianteGabriel Sebastian Cornejo Botero
Estudiante{ "statusCode": 400, "message": ["avatar should not be empty", "avatar must be an URL address"], "error": "Bad Request" }
Puedes agregar el atributo avatar antes de enviar la petición, yo lo hice así:
this.userService.create({ ...value, avatar: 'https://i.pravatar.cc/150?img=1' })
La URL puede ser cualquiera, mientras sea una URL válida
Es necesario realizar el event.preventDefault() así estemos usando formularios reactivos?