diff --git a/x/cosmostest/memdb/biddb_test.go b/x/cosmostest/memdb/biddb_test.go index fc1a673..0cff2c9 100644 --- a/x/cosmostest/memdb/biddb_test.go +++ b/x/cosmostest/memdb/biddb_test.go @@ -2,6 +2,7 @@ package memdb import ( "cosmos-test/x/cosmostest/types" + "fmt" "testing" "github.com/dgraph-io/badger/v3" @@ -21,6 +22,18 @@ func TestBasicFlow(t *testing.T) { panic(err) } + // get all bids out + if bids, err := BidDB.GetBids("0"); err != nil { + panic(err) + } else { + if bids == nil { + panic("GetBids(0) should should not return nil") + } + if len(bids) != 2 { + panic(fmt.Sprintf("Length of GetBids(0) should be 2, instead got %d", len(bids))) + } + } + // check highest bid if bid, err := BidDB.GetHighestBid("0"); err != nil { panic(err)