Skip to content

Commit

Permalink
Test fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeykiselev committed Mar 28, 2018
1 parent 0577ed6 commit a49cd60
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,20 +167,20 @@ class ScriptsValidationTest extends PropSpec with PropertyChecks with Matchers w

val s = for {
master <- accountGen
recepient <- accountGen
recipient <- accountGen
amt <- positiveLongGen
fee <- smallFeeGen
ts <- positiveIntGen
genesis = GenesisTransaction.create(master, ENOUGH_AMT, ts).explicitGet()
setScript <- selfSignedSetScriptTransactionGenP(master, Script(Typed.TRUE))
transfer = ScriptTransferTransaction.selfSigned(1, None, master, recepient, amt, ts, fee, Array.emptyByteArray).explicitGet()
transfer = ScriptTransferTransaction.selfSigned(1, None, master, recipient, amt, ts, fee, Array.emptyByteArray).explicitGet()
} yield (genesis, setScript, transfer)

forAll(s) {
case ((genesis, script, transfer)) =>
val transferWithExtraProof = transfer.copy(proofs = transfer.proofs.copy(proofs = Seq(transfer.proofs.proofs.head, ByteStr(Array(1: Byte)))))
assertDiffAndState(db, Seq(TestBlock.create(Seq(genesis, script))), TestBlock.create(Seq(transfer)), fs) { case _ => () }
assertDiffEi(db, Seq(TestBlock.create(Seq(genesis, script))), TestBlock.create(Seq(transferWithExtraProof)), fs)(totalDiffEi =>
val transferWithExtraProof = transfer.copy(proofs = Proofs(Seq(ByteStr.empty, ByteStr(Array(1: Byte)))))
assertDiffAndState(db, Seq(TestBlock.create(Seq(genesis, script))), TestBlock.create(Seq(transferWithExtraProof)), fs) { case _ => () }
assertDiffEi(db, Seq(TestBlock.create(Seq(genesis))), TestBlock.create(Seq(transferWithExtraProof)), fs)(totalDiffEi =>
totalDiffEi should produce("must have exactly 1 proof"))
}
}
Expand Down

0 comments on commit a49cd60

Please sign in to comment.