Merge commit 'c4656a88806a92cb59b2e588035a4124854feb92' into work/reports-ui
This commit is contained in:
@@ -7,6 +7,6 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||
class HomeController {
|
||||
@GetMapping("/")
|
||||
String home() {
|
||||
return "home";
|
||||
return "redirect:/dashboard";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||
<head><meta charset="utf-8"><title>Lab Timesheet</title></head>
|
||||
<body>
|
||||
<main>
|
||||
<h1>Lab Timesheet</h1>
|
||||
<form method="post" th:action="@{/logout}"><button type="submit">Sign out</button></form>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
+4
@@ -72,6 +72,10 @@ class AuthenticationWebIntegrationTest {
|
||||
.andReturn();
|
||||
var session = (MockHttpSession) login.getRequest().getSession(false);
|
||||
|
||||
mockMvc.perform(get("/").session(session))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("/dashboard"));
|
||||
|
||||
mockMvc.perform(post("/logout").session(session).with(csrf()))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("/login?logout"))
|
||||
|
||||
Reference in New Issue
Block a user