Add heavy-handed tests against pie chart bug

This commit is contained in:
Katrina Owen 2013-03-17 19:20:48 -06:00
parent 08cf7ca542
commit d6ed7d9722
2 changed files with 167 additions and 3 deletions

View file

@ -350,9 +350,9 @@ class StatsController < ApplicationController
# explicitely copy contents of hash to avoid ending up with two arrays pointing to same hashes
@actions_per_context = Array.new(size){|i| {
'name' => all_actions_per_context[i][:name],
'total' => all_actions_per_context[i][:total].to_i,
'id' => all_actions_per_context[i][:id]
'name' => all_actions_per_context[i]['name'],
'total' => all_actions_per_context[i]['total'].to_i,
'id' => all_actions_per_context[i]['id']
} }
if all_actions_per_context.size > pie_cutoff