Fixed test

This commit is contained in:
Sergei Tsoganov 2022-12-07 11:45:31 +02:00
parent a682681625
commit 045c74b7e2
2 changed files with 9 additions and 9 deletions

View file

@ -21,15 +21,15 @@ class ReppV1StatsMarketShareTest < ActionDispatch::IntegrationTest
assert json[:data].is_a? Array
assert json[:data][0].is_a? Hash
assert_equal json[:data][0][:name], 'Best Names'
assert json[:data][0][:selected]
assert_equal json[:data][0][:name], 'Good Names'
assert_nil json[:data][0][:selected]
end
def test_shows_market_share_growth_rate_data
prev_date = Time.zone.today.last_month.strftime('%m.%y')
get '/repp/v1/stats/market_share_growth_rate', headers: @auth_headers,
params: { q: { end_date: @today,
compare_to_date: prev_date } }
compare_to_end_date: prev_date } }
json = JSON.parse(response.body, symbolize_names: true)
assert_response :ok