From cd24dcc2917a44947201d46c775b6e6a9aaaa7ed Mon Sep 17 00:00:00 2001 From: Alexey Kiselev Date: Fri, 2 Mar 2018 14:29:00 +0300 Subject: [PATCH] Sync integration test on leasing more than you have was added --- .../it/sync/LeaseTransactionSuite.scala | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 it/src/test/scala/com/wavesplatform/it/sync/LeaseTransactionSuite.scala diff --git a/it/src/test/scala/com/wavesplatform/it/sync/LeaseTransactionSuite.scala b/it/src/test/scala/com/wavesplatform/it/sync/LeaseTransactionSuite.scala new file mode 100644 index 00000000000..d6d64d32d3d --- /dev/null +++ b/it/src/test/scala/com/wavesplatform/it/sync/LeaseTransactionSuite.scala @@ -0,0 +1,17 @@ +package com.wavesplatform.it.sync + +import com.wavesplatform.it.api.SyncHttpApi._ +import com.wavesplatform.it.transactions.BaseTransactionSuite +import com.wavesplatform.it.util._ + +class LeaseTransactionSuite extends BaseTransactionSuite { + + private val defaultQuantity = 100000 + private val decimals: Byte = 2 + private val defaultFee = 1.waves + + test("can't lease more than you have") { + val (balance, _) = notMiner.accountBalances(firstAddress) + assertBadRequest2(sender.lease(firstAddress, secondAddress, balance - defaultFee + 1, defaultFee)) + } +}