API Testing · Middle · Question 52 of 75

How do you test that an API validates enum values?

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.

Further reading

Problem with a question

API Testing · Middle · question 52

Test yourself

Take the API Testing · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz