Correct tests

This commit is contained in:
Rene Vergara 2022-07-07 10:56:33 -05:00
parent bd60df43d7
commit b1ae5b51df
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2
2 changed files with 7 additions and 3 deletions

View file

@ -10,6 +10,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Enhance `decodeHexText` to support Unicode
- Enhance `encodeHexText` to support Unicode
- Update tests for encode/decode of memos
### Fixed
- Fixed test for looking for an order with incorrect ID
## [0.1.0.2] - 2022-05-25

View file

@ -7,7 +7,6 @@ import Control.Exception (bracket)
import Control.Monad.IO.Class
import qualified Data.Aeson as A
import qualified Data.ByteString as B
import Data.Char (isAscii)
import Data.Configurator
import Data.Either
import Data.Maybe
@ -54,7 +53,7 @@ main = do
"ZGO::5d3d4494-51c0-432d-8495-050419957aea\nReply-To:\nzs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e"
describe "hex strings" $ do
prop "encoding and decoding are inverse" $ \x ->
(decodeHexText . encodeHexText) (filter isAscii x) == filter isAscii x
(decodeHexText . encodeHexText) x == x
describe "zToZGoTx" $ do
it "converts zcash tx to ZGo tx" $ do
let t =
@ -158,7 +157,7 @@ main = do
it "get order with wrong id" $ do
req <- testGet "/api/order/6273hrb" []
res <- httpLBS req
getResponseStatus res `shouldBe` unprocessableEntity422
getResponseStatus res `shouldBe` noContent204
it "get all orders for owner" $ do
req <- testGet "/api/allorders" [("address", Just "Zaddy")]
res <- httpJSON req