From 6f74f272660890d1e992e9cd23f689b3e76262ea Mon Sep 17 00:00:00 2001 From: Sergey Date: Wed, 18 Sep 2024 15:41:35 +0300 Subject: [PATCH] chore: added coverage --- assets/coingecko.json | 2 +- pkg/fetchers/price_test.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/coingecko.json b/assets/coingecko.json index 23dae20..6791731 100644 --- a/assets/coingecko.json +++ b/assets/coingecko.json @@ -1 +1 @@ -{"cosmos":{"usd":6.71}} \ No newline at end of file +{"cosmos":{"usd":6.71},"test": {}} \ No newline at end of file diff --git a/pkg/fetchers/price_test.go b/pkg/fetchers/price_test.go index 5e7e6b6..c3bdae7 100644 --- a/pkg/fetchers/price_test.go +++ b/pkg/fetchers/price_test.go @@ -116,7 +116,7 @@ func TestPriceFetcherConsumerCoingeckoSuccess(t *testing.T) { httpmock.RegisterResponder( "GET", - "https://api.coingecko.com/api/v3/simple/price?ids=cosmos&vs_currencies=usd", + "https://api.coingecko.com/api/v3/simple/price?ids=cosmos,test&vs_currencies=usd", httpmock.NewBytesResponder(200, assets.GetBytesOrPanic("coingecko.json")), ) @@ -126,6 +126,7 @@ func TestPriceFetcherConsumerCoingeckoSuccess(t *testing.T) { Name: "consumer", Denoms: configPkg.DenomInfos{ {Denom: "uatom", DisplayDenom: "atom", CoingeckoCurrency: "cosmos"}, + {Denom: "utest", DisplayDenom: "test", CoingeckoCurrency: "test"}, {Denom: "ustake", DisplayDenom: "stake"}, }, }},