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:
@@ -215,6 +215,24 @@ class TransactionControllerTest {
|
||||
result.expectStatus().isCreated
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `transfer fail same accounts`() {
|
||||
// given
|
||||
val request = Transfer.Request(uuid, uuid, amount)
|
||||
|
||||
every { transactionService.transfer(any(), any(), any()) } returns Mono.empty()
|
||||
|
||||
// when
|
||||
val result = webTestClient.post()
|
||||
.uri("/transfer")
|
||||
.contentType(APPLICATION_JSON)
|
||||
.bodyValue(request)
|
||||
.exchange()
|
||||
|
||||
// then
|
||||
result.expectStatus().isBadRequest
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `transfer fail amount to small`() {
|
||||
// given
|
||||
|
||||
Reference in New Issue
Block a user