moco is failing

This commit is contained in:
Marcin Grzejszczak
2017-06-21 19:26:44 +02:00
parent 2c014d6c3a
commit 84d7d82785
5 changed files with 17 additions and 17 deletions

View File

@@ -2,6 +2,8 @@ package com.example.loan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication
public class Application {
@@ -11,3 +13,12 @@ public class Application {
}
}
@RestController
class CustomController {
@GetMapping("/foo")
String foo() {
return "bar";
}
}

View File

@@ -1,2 +1,4 @@
server.port: 0
server.context-path: /my-path
server:
port: 0
servlet:
context-path: /my-path

View File

@@ -41,7 +41,7 @@ public class LoanApplicationServiceTests {
@Test
public void shouldStartThisAppWithContextPath() {
String response = new RestTemplate()
.getForObject("http://localhost:" + this.port + "/my-path/health", String.class);
.getForObject("http://localhost:" + this.port + "/my-path/foo", String.class);
assertThat(response).isNotEmpty();
}