laconicd-deprecated/x/auction/module_test.go
Bipul Prasad 34cc262218
Test cases for auction module (#8)
* Adding test cases for auction module

* Adding missing test cases and fixing failed ones

* Increasing the account balance to prevent test failures

* Addressing review comments

* Renaming test files as per directory structure

* Minor modification as per review comments

* Fixing test issues

Co-authored-by: bipulprasad <Bipul@qubecinema.com>
2021-10-14 10:49:37 +05:30

25 lines
665 B
Go

package auction_test
import (
"testing"
"github.com/stretchr/testify/require"
abcitypes "github.com/tendermint/tendermint/abci/types"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
app2 "github.com/tharsis/ethermint/app"
auctiontypes "github.com/tharsis/ethermint/x/auction/types"
)
func TestItCreatesModuleAccountOnInitBlock(t *testing.T) {
app := app2.Setup(false)
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
app.InitChain(abcitypes.RequestInitChain{
AppStateBytes: []byte("{}"),
ChainId: "test-chain-id",
})
acc := app.AccountKeeper.GetModuleAccount(ctx, auctiontypes.ModuleName)
require.NotNil(t, acc)
}