Skip to content

Commit

Permalink
test: basic test coverage for POA Authority Query
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Aug 22, 2024
1 parent cff1b71 commit 395d1e0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions keeper/query_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,17 @@ func TestPendingValidatorsQuery(t *testing.T) {
require.NotEqual(valAddr, val.OperatorAddress)
}
}

func TestPOAAuthorityQuery(t *testing.T) {
f := SetupTest(t, 1_000_000)
require := require.New(t)

currAdmin := f.k.GetAdmin(f.ctx)
require.NotEmpty(currAdmin)

r, err := f.queryServer.PoaAuthority(f.ctx, &poa.QueryPoaAuthorityRequest{})
require.NoError(err)

require.NotEmpty(r.Authority)
require.Equal(currAdmin, r.Authority)
}

0 comments on commit 395d1e0

Please sign in to comment.