-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable validation constraints in controller tests #1607
Comments
I can work on this if this is still an issue! |
@rohanshankar Yes, please do, thank you very much 🙂 |
@rohanshankar I added you to our GitHub organization, so now you should have access to assign yourself to this GitHub issue 👍🏽 |
@rohanshankar You are also welcome to join our Discord at https://discord.gg/9rz4XYJJDE 🙂 |
@rohanshankar If you would not be able or change your mind about doing this please let me know so i can work on that ;) |
@chojnackia Please give it a try if you would like. Will invite you to the GitHub organization so that you get access to create a new branch 🙂 |
When running unit tests for controllers, the validation constraints are not triggering.
For example, a validation error is expected when trying to store a word in the database that contains no text: https://github.com/elimu-ai/webapp/blob/main/src/test/java/ai/elimu/web/content/word/WordCreateControllerTest.java#L51
In this case, the controller should return a validation error message because
@Valid Word word
is used in the WordCreateController. Instead, the word gets incorrectly stored in the database. So we need to figure out why the@NotNull
validation annotations are not working in these JUnit tests.Relates to #1286
The text was updated successfully, but these errors were encountered: