mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 05:26:17 +02:00
Fixed test
This commit is contained in:
parent
a682681625
commit
045c74b7e2
2 changed files with 9 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue