mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-03-30 15:08:28 +00:00
added testcase for distribution after req and resp (#493)
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
f6c9af77c0
commit
9ea03441d8
@ -210,23 +210,23 @@ func TestMsgServerReportPoPResult(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
localDistributionOrder := types.DistributionOrder{
|
localDistributionOrder := types.DistributionOrder{
|
||||||
DaoAddr: "",
|
DaoAddr: "daoaddr",
|
||||||
DaoAmount: "",
|
DaoAmount: "daoamount",
|
||||||
DaoTxID: "",
|
DaoTxID: "",
|
||||||
InvestorAddr: "",
|
InvestorAddr: "invaddr",
|
||||||
InvestorAmount: "",
|
InvestorAmount: "invamount",
|
||||||
InvestorTxID: "",
|
InvestorTxID: "",
|
||||||
PopAddr: "",
|
PopAddr: "popaddr",
|
||||||
PopAmount: "",
|
PopAmount: "popamount",
|
||||||
PopTxID: "",
|
PopTxID: "",
|
||||||
FirstPop: 0,
|
FirstPop: 0,
|
||||||
LastPop: 5,
|
LastPop: 5,
|
||||||
Proposer: "",
|
Proposer: "proposer",
|
||||||
EarlyInvAddr: "",
|
EarlyInvAddr: "eaaddr",
|
||||||
EarlyInvAmount: "",
|
EarlyInvAmount: "eaamount",
|
||||||
EarlyInvTxID: "",
|
EarlyInvTxID: "",
|
||||||
StrategicAddr: "",
|
StrategicAddr: "straddr",
|
||||||
StrategicAmount: "",
|
StrategicAmount: "stramount",
|
||||||
StrategicTxID: "",
|
StrategicTxID: "",
|
||||||
}
|
}
|
||||||
k.StoreDistributionOrder(sdkCtx, localDistributionOrder)
|
k.StoreDistributionOrder(sdkCtx, localDistributionOrder)
|
||||||
@ -243,6 +243,26 @@ func TestMsgServerReportPoPResult(t *testing.T) {
|
|||||||
res, err := msgServer.DistributionResult(ctx, &msg)
|
res, err := msgServer.DistributionResult(ctx, &msg)
|
||||||
assert.Equal(t, nil, err)
|
assert.Equal(t, nil, err)
|
||||||
assert.Equal(t, &types.MsgDistributionResultResponse{}, res)
|
assert.Equal(t, &types.MsgDistributionResultResponse{}, res)
|
||||||
|
|
||||||
|
do, found := k.LookupDistributionOrder(sdkCtx, 5)
|
||||||
|
assert.Equal(t, true, found)
|
||||||
|
assert.Equal(t, msg.DaoTxID, do.DaoTxID)
|
||||||
|
assert.Equal(t, msg.InvestorTxID, do.InvestorTxID)
|
||||||
|
assert.Equal(t, msg.PopTxID, do.PopTxID)
|
||||||
|
assert.Equal(t, msg.EarlyInvestorTxID, do.EarlyInvTxID)
|
||||||
|
assert.Equal(t, msg.StrategicTxID, do.StrategicTxID)
|
||||||
|
|
||||||
|
assert.Equal(t, localDistributionOrder.DaoAddr, do.DaoAddr)
|
||||||
|
assert.Equal(t, localDistributionOrder.DaoAmount, do.DaoAmount)
|
||||||
|
assert.Equal(t, localDistributionOrder.InvestorAddr, do.InvestorAddr)
|
||||||
|
assert.Equal(t, localDistributionOrder.InvestorAmount, do.InvestorAmount)
|
||||||
|
assert.Equal(t, localDistributionOrder.PopAddr, do.PopAddr)
|
||||||
|
assert.Equal(t, localDistributionOrder.PopAmount, do.PopAmount)
|
||||||
|
assert.Equal(t, localDistributionOrder.EarlyInvAddr, do.EarlyInvAddr)
|
||||||
|
assert.Equal(t, localDistributionOrder.EarlyInvAmount, do.EarlyInvAmount)
|
||||||
|
assert.Equal(t, localDistributionOrder.StrategicAddr, do.StrategicAddr)
|
||||||
|
assert.Equal(t, localDistributionOrder.StrategicAmount, do.StrategicAmount)
|
||||||
|
assert.Equal(t, localDistributionOrder.Proposer, do.Proposer)
|
||||||
}
|
}
|
||||||
func TestMsgServerMintToken(t *testing.T) {
|
func TestMsgServerMintToken(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user