Removes duplicate bean definition in ResourceControllerIntegrationTests (#2286)
This commit is contained in:
@@ -122,10 +122,10 @@ public class ResourceControllerIntegrationTests {
|
||||
@Test
|
||||
public void resourceHttpDoesNotExist() throws Exception {
|
||||
when(this.resources.findOne("foo", "default", "master", "doesNotExist.txt"))
|
||||
.thenThrow(new NoSuchResourceException("Does not exist"));
|
||||
.thenThrow(new NoSuchResourceException("Does not exist"));
|
||||
|
||||
ResponseEntity<String> response = new TestRestTemplate()
|
||||
.getForEntity("http://localhost:" + port + "/foo/default/master/doesNotExist.txt", String.class);
|
||||
.getForEntity("http://localhost:" + port + "/foo/default/master/doesNotExist.txt", String.class);
|
||||
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);
|
||||
verify(this.resources).findOne("foo", "default", "master", "doesNotExist.txt");
|
||||
}
|
||||
@@ -195,11 +195,6 @@ public class ResourceControllerIntegrationTests {
|
||||
return repository;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ResourceControllerAdvice resourceControllerAdvice() {
|
||||
return new ResourceControllerAdvice();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public EnvironmentController environmentController() {
|
||||
return new EnvironmentController(environmentRepository());
|
||||
|
||||
Reference in New Issue
Block a user