Skip to content

Commit 0fc240e

Browse files
Merge pull request #3242 from DMPRoadmap/statistics_filename_change
Change csv file name for statistics from 'Completed' to 'Created'
2 parents d0c1ecc + ba2a988 commit 0fc240e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/controllers/usage_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ def yearly_plans
8484
plan_data(args: default_query_args)
8585
sep = sep_param
8686
send_data(CSV.generate(col_sep: sep) do |csv|
87-
csv << [_('Month'), _('No. Completed Plans')]
87+
csv << [_('Month'), _('No. Created Plans')]
8888
total = 0
8989
@plans_per_month.each do |data|
9090
csv << [data.date.strftime('%b-%y'), data.count]
9191
total += data.count
9292
end
9393
csv << [_('Total'), total]
94-
end, filename: 'completed_plans.csv')
94+
end, filename: 'created_plans.csv')
9595
end
9696
# rubocop:enable Metrics/AbcSize
9797

spec/controllers/usage_controller_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
get :yearly_plans
9393
end
9494
it 'assigns the correct csv data' do
95-
expected = "Month,No. Completed Plans\n" \
95+
expected = "Month,No. Created Plans\n" \
9696
"#{@date.strftime('%b-%y')},#{@plan_stat.count}\n" \
9797
"Total,#{@plan_stat.count}\n"
9898
expect(response.content_type).to eq('text/csv')

0 commit comments

Comments
 (0)