Skip to content

Commit 7868bcb

Browse files
rockneieperickyan86
authored andcommitted
withdraw fee not exsit (#462)
1 parent 6df696f commit 7868bcb

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

feemanager/fee_test.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,3 +276,25 @@ func TestWithdrawFeeFromSystem(t *testing.T) {
276276
}
277277
}
278278
}
279+
280+
func TestWithdrawFeeFromSystemNotExsit(t *testing.T) {
281+
type testFee struct {
282+
assetIndex int
283+
objectName string
284+
objectType uint64
285+
assetID uint64
286+
value *big.Int
287+
totalValue *big.Int
288+
}
289+
290+
testFeeInfo := []*testFee{
291+
{1, "testnotexsit.tt", uint64(params.ContractFeeType), uint64(2), big.NewInt(200), big.NewInt(700)},
292+
}
293+
294+
//withdraw fee from system
295+
_, err := fm.WithdrawFeeFromSystem(testFeeInfo[0].objectName, testFeeInfo[0].objectType)
296+
297+
if err == nil {
298+
t.Errorf("withdraw not exsit fee from system case failed")
299+
}
300+
}

0 commit comments

Comments
 (0)