diff --git a/api/http/test.http b/api/http/test.http index 6af1fc7..3cca66d 100644 --- a/api/http/test.http +++ b/api/http/test.http @@ -7,25 +7,41 @@ Content-Type: application/json "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 http://localhost:8081/notes Authorization: Bearer {{token}} +> {% +client.test("Request executed successfully", function() { + client.assert(response.status === 200, "Response status is not 200"); +}); +%} + ### Create a note POST http://localhost:8081/notes/babar Content-Type: application/json Authorization: Bearer {{token}} -{ - "tags": [ - "Test", - "Dev" - ] -} +> {% +client.test("Request executed successfully", function() { + client.assert(response.status === 200, "Response status is not 200"); +}); +%} -### Create a note +### Read a note GET http://localhost:8081/notes/babar Content-Type: application/json Authorization: Bearer {{token}} + +> {% +client.test("Request executed successfully", function() { + client.assert(response.status === 200, "Response status is not 200"); +}); +%}