Commit graph

2 commits

Author SHA1 Message Date
Reinier Balt
e58379e81f This fixes failing tests when the timezone is different than utc
There were several problems:
* Time.now returns the systems time, not the users time
* fixtures do not translate dates from timezone to utc, but stores the
  date verbatim
* calling a controller will set the timezone to the preference of the
  current_user. So it could be changed while you do not realize this. I
  fixed the failing test, but problems could be elsewhere
2015-08-05 11:50:33 +02:00
Katrina Owen
615a9e46c9 Encapsulate counts and totals into a class.
Move queries out of the view and into the model layer.
2013-03-02 17:22:15 -07:00