mirror of
https://github.com/spring-projects/spring-security.git
synced 2026-02-08 22:44:35 +00:00
Fix issue reports
Closes gh-18376 Signed-off-by: arianna <arianna.comi03@gmail.com>
This commit is contained in:
parent
0eb5d8f356
commit
8e9480545e
@ -376,14 +376,14 @@ Java::
|
||||
@WithMockUser(authorities="USER")
|
||||
@Test
|
||||
void endpointWhenUserAuthorityThenAuthorized() {
|
||||
this.mvc.perform(get("/endpoint/jon"))
|
||||
this.mvc.perform(get("/resource/jon"))
|
||||
.andExpect(status().isOk());
|
||||
}
|
||||
|
||||
@WithMockUser
|
||||
@Test
|
||||
void endpointWhenNotUserAuthorityThenForbidden() {
|
||||
this.mvc.perform(get("/endpoint/jon"))
|
||||
this.mvc.perform(get("/resource/jon"))
|
||||
.andExpect(status().isForbidden());
|
||||
}
|
||||
|
||||
@ -530,7 +530,7 @@ void postWhenWriteAuthorityThenAuthorized() {
|
||||
@WithMockUser(authorities="read")
|
||||
@Test
|
||||
void postWhenNoWriteAuthorityThenForbidden() {
|
||||
this.mvc.perform(get("/any").with(csrf()))
|
||||
this.mvc.perform(post("/any").with(csrf()))
|
||||
.andExpect(status().isForbidden());
|
||||
}
|
||||
----
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user