Skip to content

Commit

Permalink
Add TestGetSignerDescriptionShouldFailOnDeviceError ref fibercrypto#139
Browse files Browse the repository at this point in the history
  • Loading branch information
stdevAlDen committed Oct 14, 2019
1 parent 3a5c02f commit d428c29
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/hardware/sky-wallet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,19 @@ func TestGetSignerDescriptionShouldFailForUninitializedDevice(t *testing.T) {
// When
devId := sw.GetSignerDescription()

// Then
require.Equal(t, "undefined", devId)
}

func TestGetSignerDescriptionShouldFailOnDeviceError(t *testing.T) {
// Giving
dev := mocks.Devicer{}
dev.On("GetFeatures").Return(wire.Message{}, errors.New(""))
sw := NewSkyWallet(&dev)

// When
devId := sw.GetSignerDescription()

// Then
require.Equal(t, "undefined", devId)
}

0 comments on commit d428c29

Please sign in to comment.