Commit graph

12 commits

Author SHA1 Message Date
Jyri-Petteri Paloposki
80aad1b4f2 #1153: Remove unnecessary type change and test for stats chart templates and endpoints which were removed 2019-05-20 01:12:25 +03:00
Matt Rogers
2f85a42f91
Use the keyword args syntax for controller actions
Co-Authored-By: Dan Rice <dnrce@users.noreply.github.com>
2018-11-03 15:02:00 -05:00
Matt Rogers
eaedd53875 Add a test for longest running projects 2017-06-19 09:24:10 -05:00
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
Dan Rice
1dbef179a7 Revert breaking commits
This reverts the following commits:
319d4b00cd
403cc1015e
37485013a0
d08ffb3806
2015-04-14 23:28:18 -04:00
Reinier Balt
403cc1015e fix a few more timezone issues with the use
of localtime
2015-04-13 15:52:54 +02:00
Dan Rice
2386e67dec Simplify requiring of test helpers 2014-05-16 18:03:13 -04:00
Dan Rice
d0cec167a8 Replace Timecop with new ActiveSupport helpers 2014-05-16 13:25:22 -04:00
Don Cruse
8ed20b35f2 Fixing bug #1442
This bug was caused when the chart encountered data outside of its
visible range (i.e., the upper bound of the array size). A test was
added that inserts some data from 2 years and 16 months in the past.
The test failed on the old version, throwing exactly the error in bug
report #1442.

The fix is to check whether or not the value is within the array range
before sending the "+=" operator. With this change, the test passes.
2013-07-28 19:00:51 -05:00
Don Cruse
70f633c150 Shifting more instance variables to the controller
Also removing some instance variables that were never invoked in the
views. This sets up a future refactoring of the method of comptuting
rolling averages, which differs between the two types of "last year"
views being refactored.
2013-07-18 21:01:39 -05:00
Don Cruse
1493304fc1 Refactor last year chart
Pulled some instance variable assignment into the controller.

Also extracted a method regarding interpolated values for the present
month.
2013-07-18 16:17:30 -05:00
Reinier Balt
0bc9b0397a move tests to new directory 2013-05-11 23:13:16 +02:00
Renamed from test/functional/stats_controller_test.rb (Browse further)