Skip to content

Commit

Permalink
Merge pull request #408 from input-output-hk/mkoura/add_inline_datum_…
Browse files Browse the repository at this point in the history
…txout_test

Add golden test for creating TxOut with inline datum
  • Loading branch information
disassembler authored Oct 30, 2023
2 parents ff75875 + 390f31f commit 12b3bba
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,23 @@ hprop_golden_shelleyTransactionBuild_TxInScriptWitnessed =
H.assertFileOccurences 1 "Tx MaryEra" txBodyOutFile

H.assertEndsWithSingleNewline txBodyOutFile

hprop_golden_shelleyTransactionBuild_TxOutInlineDatum :: Property
hprop_golden_shelleyTransactionBuild_TxOutInlineDatum =
propertyOnce $ H.moduleWorkspace "tmp" $ \tempDir -> do
let datum = "test/cardano-cli-golden/files/input/babbage/42.datum"

txBodyOutFile <- noteTempFile tempDir "tx-body-out"

void $ execCardanoCLI
[ "babbage", "transaction", "build-raw"
, "--tx-in", txIn
, "--tx-out", txOut
, "--tx-out-inline-datum-file", datum
, "--fee", "12"
, "--tx-body-file", txBodyOutFile
]

H.assertFileOccurences 1 "Tx BabbageEra" txBodyOutFile

H.assertEndsWithSingleNewline txBodyOutFile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"int":42}

0 comments on commit 12b3bba

Please sign in to comment.