Skip to content

Commit

Permalink
addressed fede's comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnya97 committed Nov 6, 2018
1 parent 080a781 commit cc652a3
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions x/stake/keeper/delegation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,6 @@ func TestDelegation(t *testing.T) {
resVals = keeper.GetDelegatorValidators(ctx, addrDels[1], 4)
require.Equal(t, 3, len(resVals))

resDels := keeper.GetValidatorDelegations(ctx, addrVals[0])
require.Len(t, resDels, 2)
resDels = keeper.GetValidatorDelegations(ctx, addrVals[1])
require.Len(t, resDels, 2)
resDels = keeper.GetValidatorDelegations(ctx, addrVals[2])
require.Len(t, resDels, 2)

for i := 0; i < 3; i++ {

resVal, err := keeper.GetDelegatorValidator(ctx, addrDels[0], addrVals[i])
Expand All @@ -112,6 +105,9 @@ func TestDelegation(t *testing.T) {
resVal, err = keeper.GetDelegatorValidator(ctx, addrDels[1], addrVals[i])
require.Nil(t, err)
require.Equal(t, addrVals[i], resVal.GetOperator())

resDels := keeper.GetValidatorDelegations(ctx, addrVals[i])
require.Len(t, resDels, 2)
}

// delete a record
Expand Down

0 comments on commit cc652a3

Please sign in to comment.