Correct tests
This commit is contained in:
parent
bd60df43d7
commit
b1ae5b51df
2 changed files with 7 additions and 3 deletions
|
@ -10,6 +10,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
- Enhance `decodeHexText` to support Unicode
|
- Enhance `decodeHexText` to support Unicode
|
||||||
- Enhance `encodeHexText` 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
|
## [0.1.0.2] - 2022-05-25
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ import Control.Exception (bracket)
|
||||||
import Control.Monad.IO.Class
|
import Control.Monad.IO.Class
|
||||||
import qualified Data.Aeson as A
|
import qualified Data.Aeson as A
|
||||||
import qualified Data.ByteString as B
|
import qualified Data.ByteString as B
|
||||||
import Data.Char (isAscii)
|
|
||||||
import Data.Configurator
|
import Data.Configurator
|
||||||
import Data.Either
|
import Data.Either
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
|
@ -54,7 +53,7 @@ main = do
|
||||||
"ZGO::5d3d4494-51c0-432d-8495-050419957aea\nReply-To:\nzs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e"
|
"ZGO::5d3d4494-51c0-432d-8495-050419957aea\nReply-To:\nzs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e"
|
||||||
describe "hex strings" $ do
|
describe "hex strings" $ do
|
||||||
prop "encoding and decoding are inverse" $ \x ->
|
prop "encoding and decoding are inverse" $ \x ->
|
||||||
(decodeHexText . encodeHexText) (filter isAscii x) == filter isAscii x
|
(decodeHexText . encodeHexText) x == x
|
||||||
describe "zToZGoTx" $ do
|
describe "zToZGoTx" $ do
|
||||||
it "converts zcash tx to ZGo tx" $ do
|
it "converts zcash tx to ZGo tx" $ do
|
||||||
let t =
|
let t =
|
||||||
|
@ -158,7 +157,7 @@ main = do
|
||||||
it "get order with wrong id" $ do
|
it "get order with wrong id" $ do
|
||||||
req <- testGet "/api/order/6273hrb" []
|
req <- testGet "/api/order/6273hrb" []
|
||||||
res <- httpLBS req
|
res <- httpLBS req
|
||||||
getResponseStatus res `shouldBe` unprocessableEntity422
|
getResponseStatus res `shouldBe` noContent204
|
||||||
it "get all orders for owner" $ do
|
it "get all orders for owner" $ do
|
||||||
req <- testGet "/api/allorders" [("address", Just "Zaddy")]
|
req <- testGet "/api/allorders" [("address", Just "Zaddy")]
|
||||||
res <- httpJSON req
|
res <- httpJSON req
|
||||||
|
|
Loading…
Reference in a new issue