We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
To Reproduce Generate integration tests for controller's method which has @PreAuthorize, e.g.
@PreAuthorize
@GetMapping("/demo") @PreAuthorize("hasAuthority('write')") public String demo() { return "demo"; }
Expected behavior
Only one such test is expected.
Actual behavior
@Test @DisplayName("demo: ") public void testDemo() throws Exception { Object[] uriVariables = {}; MockHttpServletRequestBuilder mockHttpServletRequestBuilder = get("/demo", uriVariables); ResultActions actual = mockMvc.perform(mockHttpServletRequestBuilder); actual.andDo(print()); actual.andExpect((status()).is(403)); actual.andExpect((content()).string("")); } /** * @utbot.classUnderTest {@link NameController} * @utbot.methodUnderTest {@link NameController#demo()} */ @Test @DisplayName("demo: ") public void testDemo1() throws Exception { Object[] uriVariables = {}; MockHttpServletRequestBuilder mockHttpServletRequestBuilder = get("/demo", uriVariables); ResultActions actual = mockMvc.perform(mockHttpServletRequestBuilder); actual.andDo(print()); actual.andExpect((status()).is(403)); actual.andExpect((content()).string("")); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
To Reproduce
Generate integration tests for controller's method which has
@PreAuthorize
, e.g.Expected behavior
Only one such test is expected.
Actual behavior
The text was updated successfully, but these errors were encountered: