diff --git a/features/ranking_snapshots.feature b/features/ranking_snapshots.feature index d4feddb..8ea66ad 100644 --- a/features/ranking_snapshots.feature +++ b/features/ranking_snapshots.feature @@ -35,6 +35,5 @@ Feature: Ranking Snapshots pages When I visit the '/ranking_snapshots/long_selling_tools' page Then I see '距离顶部下跌幅度的排行' text Then I see '币种' text - Then I see 'ENJUSDT' text - Then I see '距离顶部下跌幅度' text - Then I see '90.0 %' text \ No newline at end of file + Then I see 'BTCUSDT' text + Then I see '距离顶部下跌幅度' text \ No newline at end of file diff --git a/features/step_definitions/ranking_snapshots_step.rb b/features/step_definitions/ranking_snapshots_step.rb index dd753ab..fe8c6d8 100644 --- a/features/step_definitions/ranking_snapshots_step.rb +++ b/features/step_definitions/ranking_snapshots_step.rb @@ -2,5 +2,6 @@ allow(SyncFuturesTickerService).to receive(:get_price_ratio).and_return([]) create(:ranking_snapshot, symbol: 'BTCUSDT', open_price: 100, last_price: 135, event_date: Date.parse('2023-01-05')) create(:ranking_snapshot, symbol: 'ETHUSDT', open_price: 2, last_price: 3.5, event_date: Date.parse('2023-02-08')) - $redis.set('get_24hr_tickers', RankingSnapshot.get_rankings.to_json) + $redis.set('get_24hr_tickers', RankingSnapshot.get_daily_rankings.to_json) + $redis.set('get_top_24hr_tickers', RankingSnapshot.get_daily_rankings.to_json) end \ No newline at end of file