From ecf292bccfd5016c5c71fa5d7d4f18791acee8f8 Mon Sep 17 00:00:00 2001 From: Hubert Van De Walle Date: Tue, 21 Apr 2020 16:07:51 +0200 Subject: [PATCH] Update tests --- api/http/test.http | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) 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"); +}); +%}