generated from Arquisoft/dede_0
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #232 from Arquisoft/DesarrolloDocAlejandro
Documentación casi completa y arreglos en los tests de restapi
- Loading branch information
Showing
6 changed files
with
19 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,17 @@ | ||
[{ | ||
"DNI":"12345678R", | ||
"nombre":"admin", | ||
"apellidos":"admin", | ||
"email":"[email protected]", | ||
"isAdmin":true | ||
},{ | ||
"DNI":"78958473Z", | ||
"nombre":"Juan", | ||
"apellidos":"Garcia", | ||
"email":"[email protected]", | ||
"isAdmin":false | ||
},{ | ||
"DNI":"25864789B", | ||
"nombre":"Wardel Stephen", | ||
"apellidos":"Curry", | ||
"email":"[email protected]", | ||
"isAdmin":false | ||
}, | ||
{ | ||
"DNI":"257413698Y", | ||
"nombre":"Carlos", | ||
"apellidos":"Alcaraz", | ||
"email":"[email protected]", | ||
"isAdmin":false | ||
},{ | ||
"DNI":"20506101F", | ||
"nombre":"Fernando", | ||
"apellidos":"Alonso", | ||
"email":"[email protected]", | ||
"isAdmin":false | ||
}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,11 +55,8 @@ afterAll(async () => { | |
|
||
describe('user ', () => { | ||
it("Se puede añadir un usuario", async() =>{ | ||
var dni:String = "7178958B"; | ||
var nombre:String = "nombrePrueba"; | ||
var apellidos:String = "apellidosPrueba"; | ||
var email:String = "[email protected]"; | ||
const response:Response = await request(app).post('/usuario').send({dni:dni,nombre:nombre,apellidos:apellidos,email:email}); | ||
const response:Response = await request(app).post('/usuario').send({email:email}); | ||
expect(response.statusCode).toBe(200); | ||
expect(response.text).toEqual("Usuario añadido correctamente"); | ||
}) | ||
|
@@ -69,9 +66,6 @@ describe('user ', () => { | |
expect(response.statusCode).toBe(200); | ||
expect(response.body).toEqual({ | ||
id:response.body.id, | ||
DNI:"20506101F", | ||
nombre:"Fernando", | ||
apellidos:"Alonso", | ||
email: "[email protected]", | ||
isAdmin: false | ||
}); | ||
|