Update test suite
This commit is contained in:
parent
7258af44c3
commit
5ce72e5d95
1 changed files with 1 additions and 127 deletions
128
test/Spec.hs
128
test/Spec.hs
|
@ -56,7 +56,7 @@ main = do
|
|||
describe "hex strings" $ do
|
||||
prop "encoding and decoding are inverse" $ \x ->
|
||||
(decodeHexText . encodeHexText) x == x
|
||||
describe "zToZGoTx" $
|
||||
describe "Memo parsers" $
|
||||
--prop "memo parsing" testMemoParser
|
||||
do
|
||||
it "parse ZecWallet memo" $ do
|
||||
|
@ -92,132 +92,6 @@ main = do
|
|||
Right m' ->
|
||||
m_session m' `shouldBe`
|
||||
U.fromString "5d3d4494-51c0-432d-8495-050419957aea"
|
||||
it "converts ZecWallet tx to ZGo tx" $ do
|
||||
let t =
|
||||
ZcashTx
|
||||
"someId"
|
||||
0.5
|
||||
50000000
|
||||
1602000
|
||||
18732456
|
||||
False
|
||||
5
|
||||
"ZGO::5d3d4494-51c0-432d-8495-050419957aea\nReply-To:\nzs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e"
|
||||
zToZGoTx t `shouldBe`
|
||||
ZGoTx
|
||||
Nothing
|
||||
"zs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e"
|
||||
"5d3d4494-51c0-432d-8495-050419957aea"
|
||||
5
|
||||
18732456
|
||||
0.5
|
||||
"someId"
|
||||
"ZGO::5d3d4494-51c0-432d-8495-050419957aea\nReply-To:\nzs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e"
|
||||
it "converts YWallet tx to ZGo tx" $ do
|
||||
let t =
|
||||
ZcashTx
|
||||
"someId"
|
||||
0.5
|
||||
50000000
|
||||
1602000
|
||||
18732456
|
||||
False
|
||||
5
|
||||
"\128737MSG\nzs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e\n\nZGO::ad8477d3-4fdd-4c97-90b2-76630b5f77e1"
|
||||
zToZGoTx t `shouldBe`
|
||||
ZGoTx
|
||||
Nothing
|
||||
"zs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e"
|
||||
"ad8477d3-4fdd-4c97-90b2-76630b5f77e1"
|
||||
5
|
||||
18732456
|
||||
0.5
|
||||
"someId"
|
||||
"\128737MSG\nzs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e\n\nZGO::ad8477d3-4fdd-4c97-90b2-76630b5f77e1"
|
||||
it "converts Zingo tx to ZGo tx" $ do
|
||||
let t =
|
||||
ZcashTx
|
||||
"someId"
|
||||
0.5
|
||||
50000000
|
||||
1602000
|
||||
18732456
|
||||
False
|
||||
5
|
||||
"ZGO::5d3d4494-51c0-432d-8495-050419957aea\nReply to:\nzs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e"
|
||||
zToZGoTx t `shouldBe`
|
||||
ZGoTx
|
||||
Nothing
|
||||
"zs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e"
|
||||
"5d3d4494-51c0-432d-8495-050419957aea"
|
||||
5
|
||||
18732456
|
||||
0.5
|
||||
"someId"
|
||||
"ZGO::5d3d4494-51c0-432d-8495-050419957aea\nReply to:\nzs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e"
|
||||
it "converts ZecWallet payment tx to ZGo tx" $ do
|
||||
let t =
|
||||
ZcashTx
|
||||
"someId"
|
||||
0.5
|
||||
50000000
|
||||
1602000
|
||||
18732456
|
||||
False
|
||||
5
|
||||
"ZGOp::5d3d4494-51c0-432d-8495-050419957aea\nReply-To:\nzs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e"
|
||||
zToZGoTx t `shouldBe`
|
||||
ZGoTx
|
||||
Nothing
|
||||
""
|
||||
"5d3d4494-51c0-432d-8495-050419957aea"
|
||||
5
|
||||
18732456
|
||||
0.5
|
||||
"someId"
|
||||
"ZGOp::5d3d4494-51c0-432d-8495-050419957aea\nReply-To:\nzs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e"
|
||||
it "converts YWallet payment tx to ZGo tx" $ do
|
||||
let t =
|
||||
ZcashTx
|
||||
"someId"
|
||||
0.5
|
||||
50000000
|
||||
1602000
|
||||
18732456
|
||||
False
|
||||
5
|
||||
"\128737MSG\nzs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e\n\nZGOp::ad8477d3-4fdd-4c97-90b2-76630b5f77e1"
|
||||
zToZGoTx t `shouldBe`
|
||||
ZGoTx
|
||||
Nothing
|
||||
""
|
||||
"ad8477d3-4fdd-4c97-90b2-76630b5f77e1"
|
||||
5
|
||||
18732456
|
||||
0.5
|
||||
"someId"
|
||||
"\128737MSG\nzs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e\n\nZGOp::ad8477d3-4fdd-4c97-90b2-76630b5f77e1"
|
||||
it "converts Zingo payment tx to ZGo tx" $ do
|
||||
let t =
|
||||
ZcashTx
|
||||
"someId"
|
||||
0.5
|
||||
50000000
|
||||
1602000
|
||||
18732456
|
||||
False
|
||||
5
|
||||
"ZGOp::5d3d4494-51c0-432d-8495-050419957aea\nReply to:\nzs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e"
|
||||
zToZGoTx t `shouldBe`
|
||||
ZGoTx
|
||||
Nothing
|
||||
""
|
||||
"5d3d4494-51c0-432d-8495-050419957aea"
|
||||
5
|
||||
18732456
|
||||
0.5
|
||||
"someId"
|
||||
"ZGOp::5d3d4494-51c0-432d-8495-050419957aea\nReply to:\nzs1w6nkameazc5gujm69350syl5w8tgvyaphums3pw8eytzy5ym08x7dvskmykkatmwrucmgv3er8e"
|
||||
describe "PIN generator" $ do
|
||||
it "should give a 7 digit" $ do
|
||||
pin <- generatePin
|
||||
|
|
Loading…
Reference in a new issue