Skip to content

Commit 1e78c8c

Browse files
Add integration test access not logged in
RISDEV-6410
1 parent 4da4a7c commit 1e78c8c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

backend/src/test/java/de/bund/digitalservice/ris/norms/integration/OidcIntegrationTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package de.bund.digitalservice.ris.norms.integration;
22

3-
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.user;
43
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
54
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
65

@@ -24,10 +23,10 @@ void noAccessIfNotLoggedIn() throws Exception {
2423
}
2524

2625
@Test
27-
void userShouldBeRedirectedOnLogout() throws Exception {
26+
void userShouldBeRedirectedToLogin() throws Exception {
2827
// when
2928
mvc
30-
.perform(get("/logout").with(user("user")).accept(MediaType.TEXT_HTML))
29+
.perform(get("/amending-laws").accept(MediaType.TEXT_HTML))
3130
// then
3231
.andExpect(status().is3xxRedirection());
3332
}

0 commit comments

Comments
 (0)