Skip to content

Update servlet test method docs to use include-code #17749

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

Merged
merged 4 commits into from
Aug 21, 2025

Conversation

jkuhel
Copy link
Contributor

@jkuhel jkuhel commented Aug 16, 2025

This commit updates the Servlet test method ascii docs to use include-code block macro.

Also, added additional tests demonstrating usage of the @WithMockUser, @WithUserDetails, @WithMockUser, and a custom @WithMockCustomUser annotations based on existing tests in org/springframework/security/test/context/showcase in the spring-security-test module.

References #16226

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 16, 2025
@jkuhel jkuhel force-pushed the gh-16226-servlet-test-method branch from 75cfd27 to a923ec8 Compare August 16, 2025 17:42
@rwinch rwinch self-assigned this Aug 21, 2025
@rwinch rwinch added in: docs An issue in Documentation or samples type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 21, 2025
@rwinch rwinch force-pushed the gh-16226-servlet-test-method branch from a923ec8 to bf08bc4 Compare August 21, 2025 16:08
jkuhel and others added 4 commits August 21, 2025 11:12
References spring-projectsgh-16226

Signed-off-by: Joe Kuhel <4983938+jkuhel@users.noreply.github.com>
Spring Security migrated the copyright to use -present to simplify
the headers. This commit aligns the header.
Previously parameters were passed in unnecessarily. This removes
the unnecessary paramaters.
This adds a static import for assertThat in the Kotlin docs code
@rwinch rwinch force-pushed the gh-16226-servlet-test-method branch from bf08bc4 to 62b5b1a Compare August 21, 2025 16:19
@rwinch rwinch enabled auto-merge (rebase) August 21, 2025 16:21
@rwinch
Copy link
Member

rwinch commented Aug 21, 2025

Thanks for the PR @jkuhel! I've rebased it, added a few minor changes, and it will be merged into 6.5.x as soon as the build passes

@rwinch rwinch merged commit 0404996 into spring-projects:6.5.x Aug 21, 2025
8 of 9 checks passed
@rwinch rwinch added this to the 6.5.4 milestone Aug 21, 2025
@jkuhel
Copy link
Contributor Author

jkuhel commented Aug 22, 2025

Perfect! Thanks @rwinch! I made note to include these changes in future PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: docs An issue in Documentation or samples type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants