Skip to content
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

Add ability to check specific error on field within Spring MVC test framework [SPR-11971] #16587

Closed
spring-projects-issues opened this issue Jul 7, 2014 · 1 comment
Assignees
Labels
in: test type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Jul 7, 2014

Lea Farmer opened SPR-11971 and commented

It would be useful to have the ability to check that if a field has an error on it, then what that specific error is.

Currently ModelResultMatchers only has methods to assert whether an attribute has field errors.

I propose adding a new method

attributeHasFieldError(final String name, final String field, final String error)

This would allow users to assert when a specific error text/key is present.


Referenced from: commits 85cdb91

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jul 8, 2014

Lea Farmer commented

I have added a pull request here: #588

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants