Skip to content

Commit

Permalink
[sky] refs #279 - Assert error when requesting fee in CalculatedHour
Browse files Browse the repository at this point in the history
... for uninjected and pending transaction
  • Loading branch information
olemis committed Jan 8, 2020
1 parent f713d25 commit 6c487fc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/coin/skycoin/models/coin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ func TestPendingTxnFee(t *testing.T) {
require.NoError(t, err)
require.Equal(t, uint64(0), fee)

_, err = pendTxn.ComputeFee(CalculatedHour)
testutil.RequireError(t, err, "Feature not implemented")

_, err = pendTxn.ComputeFee("NOCOINATALL")
testutil.RequireError(t, err, "Invalid ticker")
}
Expand All @@ -259,6 +262,9 @@ func TestUninjectedTxnFee(t *testing.T) {
require.NoError(t, err)
require.Equal(t, uint64(0), fee)

_, err = coreTxn.ComputeFee(CalculatedHour)
testutil.RequireError(t, err, "Feature not implemented")

coreTxn.fee = 64
fee, err = coreTxn.ComputeFee(CoinHour)
require.NoError(t, err)
Expand Down

0 comments on commit 6c487fc

Please sign in to comment.