From d8088a9ced767e7c758296eee87844377b694aa2 Mon Sep 17 00:00:00 2001 From: Alexandertp Date: Wed, 14 Aug 2024 10:59:53 +0200 Subject: [PATCH] Create integration tests --- API/integration-tests.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 API/integration-tests.sh diff --git a/API/integration-tests.sh b/API/integration-tests.sh new file mode 100644 index 0000000..849c8fd --- /dev/null +++ b/API/integration-tests.sh @@ -0,0 +1,8 @@ +USER_ID=`curl -X POST http://localhost:5287/api/Users -d '{"Email":"hej@example.com","Username":"Gamer","Password":"Gamer123!"}' --header 'Content-Type: application/json'` + +TOKEN=`curl -X POST http://localhost:5287/api/Users/login -d '{"Email":"hej@example.com","Password":"Gamer123!"}' --header 'Content-Type: application/json'` + +curl http://localhost:5287/api/Users/$USER_ID + +curl -X DELETE http://localhost:5287/api/Users/$USER_ID +