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 patch() to MockMvcRequestBuilders [SPR-11299] #15923

Closed
spring-projects-issues opened this issue Jan 10, 2014 · 6 comments
Closed

Add patch() to MockMvcRequestBuilders [SPR-11299] #15923

spring-projects-issues opened this issue Jan 10, 2014 · 6 comments
Assignees
Labels
in: test Issues in the test module status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Greg Turnquist opened SPR-11299 and commented

While working on a pull request for Spring Data REST for PATCH support, I started writing a test case, only to discover we don't have a patch() method to simulate an HTTP PATCH. It would be very useful and probably not a lot of effort to add that on.


Affects: 3.2.6, 4.0 GA

Referenced from: commits 3db6a7f, 6b0d887

Backported to: 3.2.7

0 votes, 5 watchers

@spring-projects-issues
Copy link
Collaborator Author

Greg Turnquist commented

BTW, are we adding new features to 3.2.x? If so, it would be useful there as well.

@spring-projects-issues
Copy link
Collaborator Author

Rossen Stoyanchev commented

As a workaround you can use:

MockMvcRequestBuilders.request(HttpMethod.PATCH, "/foo/{id}", 1);

@spring-projects-issues
Copy link
Collaborator Author

Greg Turnquist commented

See pull request #437

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

This looks trivial enough to add it to 3.2.7 as well...

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Rossen Stoyanchev commented

This is fixed in master.

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Alright, I'll backport it to 3.2.7 tonight.

Juergen

@spring-projects-issues spring-projects-issues added in: test Issues in the test module status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.0.1 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues in the test module status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants