0g-chain/x/pricefeed/genesis_test.go
Kevin Davis d04aad5cc9
Pricefeed fixes (#308)
* fix: remove redundant debt limit param

* wip: test pricefeed genesis

* fix: pricefeed querier

* fix: comments, naming

* fix: query path

* fix: store methods

* fix: query methods

* fix: standardize genesis validation
2020-01-17 13:29:19 +01:00

40 lines
724 B
Go

package pricefeed_test
import (
"testing"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/kava-labs/kava/app"
"github.com/kava-labs/kava/x/pricefeed"
"github.com/stretchr/testify/suite"
)
type GenesisTestSuite struct {
suite.Suite
ctx sdk.Context
keeper pricefeed.Keeper
}
func (suite *GenesisTestSuite) TestValidGenState() {
tApp := app.NewTestApp()
suite.NotPanics(func() {
tApp.InitializeFromGenesisStates(
NewPricefeedGenStateMulti(),
)
})
_, addrs := app.GeneratePrivKeyAddressPairs(10)
suite.NotPanics(func() {
tApp.InitializeFromGenesisStates(
NewPricefeedGenStateWithOracles(addrs),
)
})
}
func TestGenesisTestSuite(t *testing.T) {
suite.Run(t, new(GenesisTestSuite))
}