generated from aura-ascend/template-service
infinity money bug :D
This is here to show a small miss with big problems. - add missing test to - TransactionEndpoints - TransactionControllerTest - update Transfer with validation for sender receiver - add SenderReceiverValidator - add SenderReceiver
This commit is contained in:
@@ -195,6 +195,25 @@ class TransactionEndpoints {
|
||||
result.expectStatus().isEqualTo(CREATED)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `deposit - fail same account`() {
|
||||
// given
|
||||
val request = Transfer.Request(
|
||||
account = UUID.fromString("00000000-0000-7000-0000-000000000001"),
|
||||
receiver = UUID.fromString("00000000-0000-7000-0000-000000000001"),
|
||||
amount = BigDecimal.valueOf(1.00),
|
||||
)
|
||||
|
||||
// when
|
||||
val result = webClient.post()
|
||||
.uri("/transfer")
|
||||
.bodyValue(request)
|
||||
.exchange()
|
||||
|
||||
// then
|
||||
result.expectStatus().isEqualTo(BAD_REQUEST)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `deposit - fail amount to small`() {
|
||||
// given
|
||||
|
||||
Reference in New Issue
Block a user