Open UnTamedLaw opened 4 years ago
Test Objective: behavior of DELETE/keybundle
Environment: Postman
Endpoint: https://api.2edusite.com/feature-sprint5/keybundle/{keybundle_id}
Parameters: none
Body: set to raw
Empty DELETE request (no keybundle_id) Expected Status 400
Received { "message": "Missing Authentication Token" }
Perfect POST request (keybundle_id exists in db) Expected Status 200 and confirmation of deletion
Received Status 200 "Default keybundle_id 444470 deleted"
Passing same keybundle_id again (i.e. id that does not exist in db) Expected Status 404
Received 403 (Forbidden) { "errorType": "string", "errorMessage": "Not Found ", "trace": [] }
behavior of PUT/keybundle
Empty PUT request Expected Status 400
Received 403 (Forbidden) { "message": "Missing Authentication Token" }
Perfect PUT request without dates "keybundle_id": 112, { "keybundle_status_id": 2, "property_id": 2, "keyholder_id": 1, }
Expected Status 200 OK
Received 400 (Bad Request) { "message": "Bad Request !" }
Perfect PUT request with dates "keybundle_id": 112, { "keybundle_status_id": 2, "property_id": 2, "keyholder_id": 1, "keybundle_checkout_date": "2020-03-27T00:00:00.000Z", "keybundle_due_date": "2020-04-10T00:00:00.000Z" }
PUT request with "keyholder_type_id” as char "keybundle_id": abc, { "keybundle_status_id": 2, "property_id": 2, "keyholder_id": 2, "keybundle_checkout_date": "2020-03-27T00:00:00.000Z", "keybundle_due_date": "2020-04-10T00:00:00.000Z" }
Expected Status 400
PUT request with "keybundle_status_id" as string "keybundle_id": 112, { "keybundle_status_id": "foo", "property_id": 2, "keyholder_id": 2, "keybundle_checkout_date": "2020-03-27T00:00:00.000Z", "keybundle_due_date": "2020-04-10T00:00:00.000Z" }
PUT request with non-existant property_id
"keybundle_id": 112, { "keybundle_status_id": 2, "property_id": 2020, "keyholder_id": 2, "keybundle_checkout_date": "2020-03-27T00:00:00.000Z", "keybundle_due_date": "2020-04-10T00:00:00.000Z" }
PUT request with non-existant keyholder_id "keybundle_id": 112, { "keybundle_status_id": 2, "property_id": 2, "keyholder_id": 200, "keybundle_checkout_date": "2020-03-27T00:00:00.000Z", "keybundle_due_date": "2020-04-10T00:00:00.000Z" }
PUT request with extra parameter "keybundle_id": 112, { "first_name": "Anu", "keybundle_status_id": 2, "property_id": 2020, "keyholder_id": 2, "keybundle_checkout_date": "2020-03-27T00:00:00.000Z", "keybundle_due_date": "2020-04-10T00:00:00.000Z" }
PUT request without one parameter, property_id "keybundle_id": 112, { "keybundle_status_id": 2, "keyholder_id": 2, "keybundle_checkout_date": "2020-03-27T00:00:00.000Z", "keybundle_due_date": "2020-04-10T00:00:00.000Z" }
Test Objective: behavior of DELETE/keybundle
Environment: Postman
Endpoint: https://api.2edusite.com/feature-sprint5/keybundle/{keybundle_id}
Parameters: none
Body: set to raw
Empty DELETE request (no keybundle_id) Expected Status 400
Received { "message": "Missing Authentication Token" }
Perfect POST request (keybundle_id exists in db) Expected Status 200 and confirmation of deletion
Received Status 200 "Default keybundle_id 444470 deleted"
Passing same keybundle_id again (i.e. id that does not exist in db) Expected Status 404
Received 403 (Forbidden) { "errorType": "string", "errorMessage": "Not Found ", "trace": [] }
behavior of PUT/keybundle
Environment: Postman
Endpoint: https://api.2edusite.com/feature-sprint5/keybundle/{keybundle_id}
Parameters: none
Body: set to raw
Empty PUT request Expected Status 400
Received 403 (Forbidden) { "message": "Missing Authentication Token" }
Perfect PUT request without dates "keybundle_id": 112, { "keybundle_status_id": 2, "property_id": 2, "keyholder_id": 1, }
Expected Status 200 OK
Received 400 (Bad Request) { "message": "Bad Request !" }
Perfect PUT request with dates "keybundle_id": 112, { "keybundle_status_id": 2, "property_id": 2, "keyholder_id": 1, "keybundle_checkout_date": "2020-03-27T00:00:00.000Z", "keybundle_due_date": "2020-04-10T00:00:00.000Z" }
Expected Status 200 OK
Received 400 (Bad Request) { "message": "Bad Request !" }
PUT request with "keyholder_type_id” as char "keybundle_id": abc, { "keybundle_status_id": 2, "property_id": 2, "keyholder_id": 2, "keybundle_checkout_date": "2020-03-27T00:00:00.000Z", "keybundle_due_date": "2020-04-10T00:00:00.000Z" }
Expected Status 400
Received 400 (Bad Request) { "message": "Bad Request !" }
PUT request with "keybundle_status_id" as string "keybundle_id": 112, { "keybundle_status_id": "foo", "property_id": 2, "keyholder_id": 2, "keybundle_checkout_date": "2020-03-27T00:00:00.000Z", "keybundle_due_date": "2020-04-10T00:00:00.000Z" }
Expected Status 400
Received 400 (Bad Request) { "message": "Bad Request !" }
PUT request with non-existant property_id
"keybundle_id": 112, { "keybundle_status_id": 2, "property_id": 2020, "keyholder_id": 2, "keybundle_checkout_date": "2020-03-27T00:00:00.000Z", "keybundle_due_date": "2020-04-10T00:00:00.000Z" }
Expected Status 400
Received 400 (Bad Request) { "message": "Bad Request !" }
PUT request with non-existant keyholder_id "keybundle_id": 112, { "keybundle_status_id": 2, "property_id": 2, "keyholder_id": 200, "keybundle_checkout_date": "2020-03-27T00:00:00.000Z", "keybundle_due_date": "2020-04-10T00:00:00.000Z" }
Expected Status 400
Received 400 (Bad Request) { "message": "Bad Request !" }
PUT request with extra parameter "keybundle_id": 112, { "first_name": "Anu", "keybundle_status_id": 2, "property_id": 2020, "keyholder_id": 2, "keybundle_checkout_date": "2020-03-27T00:00:00.000Z", "keybundle_due_date": "2020-04-10T00:00:00.000Z" }
Expected Status 400
Received 400 (Bad Request) { "message": "Bad Request !" }
PUT request without one parameter, property_id "keybundle_id": 112, { "keybundle_status_id": 2, "keyholder_id": 2, "keybundle_checkout_date": "2020-03-27T00:00:00.000Z", "keybundle_due_date": "2020-04-10T00:00:00.000Z" }
Expected Status 400
Received 400 (Bad Request) { "message": "Bad Request !" }