diff --git a/protocol/x/prices/keeper/market_test.go b/protocol/x/prices/keeper/market_test.go index c9a2bb0ea4..b5586fabc8 100644 --- a/protocol/x/prices/keeper/market_test.go +++ b/protocol/x/prices/keeper/market_test.go @@ -51,6 +51,10 @@ func TestCreateMarket(t *testing.T) { mmMarket, _ := marketMapKeeper.GetMarket(ctx, currencyPair.String()) require.False(t, mmMarket.Ticker.Enabled) + // Verify that currency pair is not in the CurrencyPairToID cache + _, found := keeper.GetIDForCurrencyPair(ctx, currencyPair) + require.False(t, found) + marketParam, err := keeper.CreateMarket( ctx, testMarketParams, @@ -74,6 +78,11 @@ func TestCreateMarket(t *testing.T) { require.Equal(t, uint32(2), marketParam.MinExchanges) require.Equal(t, uint32(9999), marketParam.MinPriceChangePpm) + // Verify that currency pair is in the CurrencyPairToID cache + cpID, found := keeper.GetIDForCurrencyPair(ctx, currencyPair) + require.True(t, found) + require.Equal(t, uint64(marketParam.Id), cpID) + // Verify expected price of 0 created. require.Equal(t, uint32(0), marketPrice.Id) require.Equal(t, int32(-6), marketPrice.Exponent)