For POST key test only:
I used this test link: https://api.2edusite.com/feature-sprint5/property/2/keybundle/
And the following for the body input:
{
"keybundle_id": 44409,
"keybundle_status_id": 2,
"keyholder_id": 1,
"keybundle_checkout_date": "2020-01-01",
"keybundle_due_date": "2020-01-02"
}
I received a 500 Internal server error with the following message: errorMessage": "Server Error Error: ER_NO_REFERENCED_ROW_2: Cannot add or update a child row: a foreign key constraint fails (keymanagement.keybundle, CONSTRAINT keybundle_ibfk_1 FOREIGN KEY (property_id) REFERENCES property (property_id) ON DELETE NO ACTION)",
I also tried to create a keybundle with a keybundle id that already exists in the database and got a 500 Internal server error there as well with a duplicate id error message.
For POST key test only: I used this test link: https://api.2edusite.com/feature-sprint5/property/2/keybundle/ And the following for the body input: { "keybundle_id": 44409, "keybundle_status_id": 2, "keyholder_id": 1, "keybundle_checkout_date": "2020-01-01", "keybundle_due_date": "2020-01-02" }
I received a 200 OK for this test.
Error checking - I tried to create a keybundle with a property id that doesn't exist using this link: https://api.2edusite.com/feature-sprint5/property/100/keybundle/
I received a 500 Internal server error with the following message: errorMessage": "Server Error Error: ER_NO_REFERENCED_ROW_2: Cannot add or update a child row: a foreign key constraint fails (
keymanagement
.keybundle
, CONSTRAINTkeybundle_ibfk_1
FOREIGN KEY (property_id
) REFERENCESproperty
(property_id
) ON DELETE NO ACTION)",I also tried to create a keybundle with a keybundle id that already exists in the database and got a 500 Internal server error there as well with a duplicate id error message.