Skip to content

Commit

Permalink
Add JSON roundtrip property for ScriptData
Browse files Browse the repository at this point in the history
using detailed schema.
  • Loading branch information
sorki authored and newhoggy committed Mar 28, 2023
1 parent 7cafc3a commit fe7227d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cardano-api/test/Test/Cardano/Api/Typed/Script.hs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ prop_roundtrip_ScriptData =
sData <- H.forAll genHashableScriptData
sData === fromAlonzoData (toAlonzoData sData)

prop_roundtrip_ScriptData_JSON :: Property
prop_roundtrip_ScriptData_JSON =
H.property $ do
sData <- H.forAll genScriptData
H.tripping sData scriptDataToJsonDetailedSchema scriptDataFromJsonDetailedSchema

-- -----------------------------------------------------------------------------

tests :: TestTree
Expand Down

0 comments on commit fe7227d

Please sign in to comment.