This commit is contained in:
dartpopikyardo
2016-09-02 15:11:44 +03:00
parent dde554e442
commit 55cb34ef4f
18 changed files with 20 additions and 17 deletions

View File

@@ -16,7 +16,7 @@ import java.util.Date;
import java.util.concurrent.CompletableFuture;
@RestController
@RequestMapping("/transfers")
@RequestMapping("/api/transfers")
public class MoneyTransferController {
private final MoneyTransferService moneyTransferService;

View File

@@ -36,7 +36,7 @@ public class MoneyTransferControllerIntegrationTest {
@Test
public void shouldCreateAccount() throws Exception {
mockMvc.perform(post("/transfers")
mockMvc.perform(post("/api/transfers")
.contentType(MediaType.APPLICATION_JSON)
.content("{\"fromAccountId\" : \"fromAccountId\", \"toAccountId\" : \"toAccountId\", \"amount\" : \"500\"}")
.accept(MediaType.APPLICATION_JSON))
@@ -45,7 +45,7 @@ public class MoneyTransferControllerIntegrationTest {
@Test
public void shouldRejectBadRequest() throws Exception {
mockMvc.perform(post("/transfers")
mockMvc.perform(post("/api/transfers")
.contentType(MediaType.APPLICATION_JSON)
.content("{\"fromAccountId\" : \"fromAccountIdXXXXXX\"}, {\"toAccountId\" : \"toAccountId\"}, {\"amount\" : \"500\"}")
.accept(MediaType.APPLICATION_JSON))