morley-0.6.0: test/Test/Integrational.hs
-- | Tests for integrational testing machinery.
module Test.Integrational
( spec_Chain_id
) where
import Test.Hspec (Spec, it)
import Lorentz (( # ))
import qualified Lorentz as L
import Lorentz.Test
import Tezos.Core
spec_Chain_id :: Spec
spec_Chain_id = do
it "Chain id can be set" $
integrationalTestExpectation $ do
let code = L.drop # L.chainId # L.nil # L.pair
let chainId = mkChainIdUnsafe "aaaa"
contract <- lOriginate code "" dummyChainId (toMutez 50)
setChainId chainId
lCallDef @() contract ()
validate . Right $
lExpectStorageConst contract chainId