Skip to content

Commit

Permalink
[sky] refs #279 - Request fee for invalid asset from pending txn shou…
Browse files Browse the repository at this point in the history
…ld return error
  • Loading branch information
olemis committed Jan 8, 2020
1 parent 414bae4 commit eff3103
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/coin/skycoin/models/coin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/SkycoinProject/skycoin/src/api"
"github.com/SkycoinProject/skycoin/src/cipher"
"github.com/SkycoinProject/skycoin/src/readable"
"github.com/SkycoinProject/skycoin/src/testutil"
"github.com/fibercrypto/fibercryptowallet/src/core"
"github.com/fibercrypto/fibercryptowallet/src/util/requirethat"
)
Expand Down Expand Up @@ -232,7 +233,11 @@ func TestPendingTxnStatus(t *testing.T) {

func TestPendingTxnFee(t *testing.T) {
pendTxn := new(SkycoinPendingTransaction)

fee, err := pendTxn.ComputeFee(Sky)
require.NoError(t, err)
require.Equal(t, uint64(0), fee)

fee, err = pendTxn.ComputeFee("NOCOINATALL")
testutil.RequireError(t, err, "Invalid ticker")
}

0 comments on commit eff3103

Please sign in to comment.