Improve StatsController#thirty_days_flow and #clean_hash
This commit is contained in:
parent
11015787bf
commit
913735554c
2 changed files with 15 additions and 8 deletions
|
@ -8,7 +8,7 @@ describe StatsController, type: :controller do
|
|||
FactoryGirl.create(:procedure, :created_at => 1.day.ago)
|
||||
|
||||
@expected_hash = {}
|
||||
(15.days.ago.to_date..1.day.ago.to_date).each do |day|
|
||||
(30.days.ago.to_date..Time.now.to_date).each do |day|
|
||||
if [15.days.ago.to_date, 1.day.ago.to_date].include?(day)
|
||||
@expected_hash[day] = 1
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue