Update spring-javaformat to 0.0.39

Closes gh-2528
This commit is contained in:
Marcus Da Coregio
2023-10-19 10:33:00 -03:00
parent db7b19bf88
commit 2b69cff478
101 changed files with 765 additions and 655 deletions

View File

@@ -65,14 +65,18 @@ class RestMockMvcTests {
@BeforeEach
void setup() {
this.mvc = MockMvcBuilders.webAppContextSetup(this.context).alwaysDo(print())
.addFilters(this.sessionRepositoryFilter).apply(springSecurity()).build();
this.mvc = MockMvcBuilders.webAppContextSetup(this.context)
.alwaysDo(print())
.addFilters(this.sessionRepositoryFilter)
.apply(springSecurity())
.build();
}
@Test
void noSessionOnNoCredentials() throws Exception {
this.mvc.perform(get("/")).andExpect(header().doesNotExist("X-Auth-Token"))
.andExpect(status().isUnauthorized());
this.mvc.perform(get("/"))
.andExpect(header().doesNotExist("X-Auth-Token"))
.andExpect(status().isUnauthorized());
}
@WithMockUser

View File

@@ -60,8 +60,8 @@ class RestTests {
HttpHeaders headers = new HttpHeaders();
headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));
assertThatExceptionOfType(HttpClientErrorException.class)
.isThrownBy(() -> getForUser(this.baseUrl + "/", headers, String.class))
.satisfies((e) -> assertThat(e.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED));
.isThrownBy(() -> getForUser(this.baseUrl + "/", headers, String.class))
.satisfies((e) -> assertThat(e.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED));
}
@Test