API Testing · Middle · Question 52 of 75
How do you test that an API validates enum values?
- 1Send a value outside the allowed list and expect a 400
- 2Enum fields can't be tested from outside the server
- 3Send only the first value from the list every time
Show the answer
Correct answer: Send a value outside the allowed list and expect a 400
Explanation
Also check case sensitivity (PAID vs paid) and that error messages list allowed values.