Skip to content

Commit

Permalink
Rename Pro Metrics 'Total requests made this week' report label
Browse files Browse the repository at this point in the history
'Total requests made this week' wasn't a good description of the
reported data. 'Estimated total number of Pro requests' is clearer.

Also changes the data key from `:total_new_requests` to
`:estimated_total_pro_requests`
  • Loading branch information
lizconlan committed Jul 11, 2019
1 parent 6c6797e commit da36999
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@
<%= _('New Pro requests this week:') %> <%= @data[:new_pro_requests] %>
<%= _('Total requests made this week:') %> <%= @data[:total_new_requests] %>
<%= _('Estimated total number of Pro requests:') %> <%= @data[:estimated_total_pro_requests] %>
2 changes: 1 addition & 1 deletion lib/alaveteli_pro/metrics_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def report_data
data =
{
new_pro_requests: number_of_requests_created_this_week,
total_new_requests: estimated_number_of_pro_requests,
estimated_total_pro_requests: estimated_number_of_pro_requests,
new_batches: number_of_batch_requests_created_this_week,
new_signups: number_of_pro_signups_this_week,
total_accounts: total_number_of_pro_accounts,
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/alaveteli_pro/metrics_report_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
expect(subject[:new_pro_requests]).to eq 4
end

it 'returns the total number of Pro requests' do
expect(subject[:total_new_requests]).to eq 5
it 'returns the estimated (total) number of Pro requests' do
expect(subject[:estimated_total_pro_requests]).to eq 5
end

it 'returns the number of batch requests' do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def weekly_report
data =
{
new_pro_requests: 104,
total_new_requests: 37535,
estimated_total_pro_requests: 37535,
new_batches: 3,
new_signups: 5,
total_accounts: 284,
Expand Down

0 comments on commit da36999

Please sign in to comment.