code refactor

This commit is contained in:
MaysWind
2025-08-04 20:43:33 +08:00
parent d35e127b9e
commit 84523d8b8a
18 changed files with 163 additions and 95 deletions
@@ -326,15 +326,12 @@ func executeLatestExchangeRateHandler(t *testing.T, dataSourceType string) *mode
err := InitializeExchangeRatesDataSource(config)
assert.Nil(t, err)
dataSource := Container.Current
assert.NotNil(t, dataSource)
ginContext, _ := gin.CreateTestContext(httptest.NewRecorder())
context := &core.WebContext{
Context: ginContext,
}
exchangeRateResponse, err := dataSource.GetLatestExchangeRates(context, context.GetCurrentUid(), config)
exchangeRateResponse, err := Container.GetLatestExchangeRates(context, context.GetCurrentUid(), config)
assert.Nil(t, err)
assert.NotNil(t, exchangeRateResponse)