Merge pull request #5496 from techAPJ/admin-graphs

FIX: graphs should go to zero for missing dates
This commit is contained in:
Arpit Jalan
2018-01-15 11:10:29 +05:30
committed by GitHub
6 changed files with 51 additions and 9 deletions

View File

@ -177,6 +177,7 @@ RSpec.describe SearchLog, type: :model do
SearchLog.where(term: 'ruby', ip_address: '127.0.0.2').update_all(search_result_id: 24)
term_click_through_details = SearchLog.term_details("ruby", :all, :click_through_only)
expect(term_click_through_details[:period]).to eq("all")
expect(term_click_through_details[:data][0][:y]).to eq(1)
end
end