From b1ae5b51dfc30cca23ca0982229eebd64fea465a Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Thu, 7 Jul 2022 10:56:33 -0500 Subject: [PATCH] Correct tests --- CHANGELOG.md | 5 +++++ test/Spec.hs | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bdf0f8..4d0e7b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/test/Spec.hs b/test/Spec.hs index 87c7470..9abc297 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -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