| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.API.ServerOutputFilterSpec
Description
Tests for the ?address= output filter applied by WSServer.
ServerSpec covers the server-side wiring that reaches it.
Synopsis
- spec :: Spec
- aliceKeys :: (VerificationKey PaymentKey, SigningKey PaymentKey)
- bobKeys :: (VerificationKey PaymentKey, SigningKey PaymentKey)
- carolKeys :: (VerificationKey PaymentKey, SigningKey PaymentKey)
- aliceAddress :: AddressInEra
- bobAddress :: AddressInEra
- carolAddress :: AddressInEra
- txPayingTo :: [AddressInEra] -> Tx
- aliceSpendsTo :: AddressInEra -> Tx
- snapshotConfirmed :: [Tx] -> ServerOutput Tx
- serverOutputsOtherThanSnapshotConfirmed :: IO [(String, ServerOutput Tx)]
- shouldPassFor :: HasCallStack => ServerOutput Tx -> AddressInEra -> Expectation
- shouldDropFor :: HasCallStack => ServerOutput Tx -> AddressInEra -> Expectation
- shouldPass :: HasCallStack => ServerOutput Tx -> Text -> Expectation
- shouldDrop :: HasCallStack => ServerOutput Tx -> Text -> Expectation
- matches :: ServerOutput Tx -> Text -> Bool
- bech32Of :: AddressInEra -> Text
Documentation
Fixtures
aliceAddress :: AddressInEra Source #
bobAddress :: AddressInEra Source #
carolAddress :: AddressInEra Source #
txPayingTo :: [AddressInEra] -> Tx Source #
A transaction paying 2 Ada to each of the given addresses, unsigned.
aliceSpendsTo :: AddressInEra -> Tx Source #
Signed by Alice and paying only to the given address, so her witness is all the filter has to go on.
snapshotConfirmed :: [Tx] -> ServerOutput Tx Source #
serverOutputsOtherThanSnapshotConfirmed :: IO [(String, ServerOutput Tx)] Source #
Helpers
shouldPassFor :: HasCallStack => ServerOutput Tx -> AddressInEra -> Expectation Source #
shouldDropFor :: HasCallStack => ServerOutput Tx -> AddressInEra -> Expectation Source #
shouldPass :: HasCallStack => ServerOutput Tx -> Text -> Expectation Source #
shouldDrop :: HasCallStack => ServerOutput Tx -> Text -> Expectation Source #