2024-03-26 20:05:52 +00:00
|
|
|
package pricefeed_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2024-09-25 15:31:20 +00:00
|
|
|
"github.com/0glabs/0g-chain/x/pricefeed"
|
|
|
|
"github.com/0glabs/0g-chain/x/pricefeed/keeper"
|
|
|
|
"github.com/0glabs/0g-chain/x/pricefeed/testutil"
|
2024-03-26 20:05:52 +00:00
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestEndBlocker_UpdatesMultipleMarkets(t *testing.T) {
|
|
|
|
testutil.SetCurrentPrices_PriceCalculations(t, func(ctx sdk.Context, keeper keeper.Keeper) {
|
|
|
|
pricefeed.EndBlocker(ctx, keeper)
|
|
|
|
})
|
|
|
|
|
|
|
|
testutil.SetCurrentPrices_EventEmission(t, func(ctx sdk.Context, keeper keeper.Keeper) {
|
|
|
|
pricefeed.EndBlocker(ctx, keeper)
|
|
|
|
})
|
|
|
|
}
|