Update tests
This commit is contained in:
parent
5850541ad8
commit
ecf292bccf
@ -7,25 +7,41 @@ Content-Type: application/json
|
|||||||
"password": "test"
|
"password": "test"
|
||||||
}
|
}
|
||||||
|
|
||||||
> {% client.global.set("token", response.body.token); %}
|
> {%
|
||||||
|
client.global.set("token", response.body.token);
|
||||||
|
client.test("Request executed successfully", function() {
|
||||||
|
client.assert(response.status === 200, "Response status is not 200");
|
||||||
|
});
|
||||||
|
%}
|
||||||
|
|
||||||
### Get notes
|
### Get notes
|
||||||
GET http://localhost:8081/notes
|
GET http://localhost:8081/notes
|
||||||
Authorization: Bearer {{token}}
|
Authorization: Bearer {{token}}
|
||||||
|
|
||||||
|
> {%
|
||||||
|
client.test("Request executed successfully", function() {
|
||||||
|
client.assert(response.status === 200, "Response status is not 200");
|
||||||
|
});
|
||||||
|
%}
|
||||||
|
|
||||||
### Create a note
|
### Create a note
|
||||||
POST http://localhost:8081/notes/babar
|
POST http://localhost:8081/notes/babar
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Authorization: Bearer {{token}}
|
Authorization: Bearer {{token}}
|
||||||
|
|
||||||
{
|
> {%
|
||||||
"tags": [
|
client.test("Request executed successfully", function() {
|
||||||
"Test",
|
client.assert(response.status === 200, "Response status is not 200");
|
||||||
"Dev"
|
});
|
||||||
]
|
%}
|
||||||
}
|
|
||||||
|
|
||||||
### Create a note
|
### Read a note
|
||||||
GET http://localhost:8081/notes/babar
|
GET http://localhost:8081/notes/babar
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Authorization: Bearer {{token}}
|
Authorization: Bearer {{token}}
|
||||||
|
|
||||||
|
> {%
|
||||||
|
client.test("Request executed successfully", function() {
|
||||||
|
client.assert(response.status === 200, "Response status is not 200");
|
||||||
|
});
|
||||||
|
%}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user