Skip to content

Commit

Permalink
[sky] refs #279 - Add TestSkycoinTxnFee
Browse files Browse the repository at this point in the history
  • Loading branch information
olemis committed Jan 8, 2020
1 parent a6dfe62 commit 7d499db
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/coin/skycoin/models/coin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,3 +281,17 @@ func TestUninjectedTxnFee(t *testing.T) {
_, err = coreTxn.ComputeFee("NOCOINATALL")
testutil.RequireError(t, err, "Invalid ticker")
}

func TestSkycoinTxnFee(t *testing.T) {
skyTxn := new(SkycoinTransaction)

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

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

_, err = skyTxn.ComputeFee("NOCOINATALL")
testutil.RequireError(t, err, "Invalid ticker")
}

0 comments on commit 7d499db

Please sign in to comment.