Commit graph

478 commits

Author SHA1 Message Date
Matt Rogers
6681df9530 Merge pull request #202 from TracksApp/extract-extras-from-user
Extract time and date concerns from User
2013-08-01 14:59:17 -07:00
Matt Rogers
96777c2e3a Replace User#time with UserTime#time 2013-07-30 16:21:04 -05:00
Matt Rogers
8512e8db3b rename DateUtils to UserTime 2013-07-29 21:51:15 -05:00
Matt Rogers
07a983ca1c clean up whitespace 2013-07-29 16:36:52 -05:00
Matt Rogers
a1aaa283f1 Remove User#at_midnight
Replace it with a class called DateUtils with a method called
`#midnight_for` that takes a preference instance and date to convert to
midnight.
2013-07-29 16:34:23 -05: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
Brett A. Rogers
f18f1c7345 Move calendar test down to unit tests
Remove tests that are specific to the calendar model from controller
test and move them to unit tests.
2013-07-19 17:27:38 -05:00
Brett A. Rogers
7a5374d567 Fix setup for calendar controller test
Ensure that the expected todos are actually due in the same month
2013-07-19 15:43:56 -05:00
Matt Rogers
c28ffd6763 Merge pull request #193 from mattdbridges/extract-rich-message
Extract behavior from Todo.from_rich_message
2013-07-18 20:12:03 -07: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
Matt Bridges
ecdade33c3 Pull out RichMessageExtractor
No need to have it embedded
  when it should be unit tested!
2013-07-18 18:34:09 -05:00
Matt Bridges
c2111b2f8e Extract behavior from Todo.from_rich_message
`Todo.from_rich_message` was partially tested from the MessageGateway,
but it is mostly untested and does not belong in Todo due to it's unique
nature. Extract it entirely from `Todo` into it's own dedicated object
for unit testing.
2013-07-18 16:35:51 -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
2daffef683 fix failing tests 2013-06-17 10:06:38 +02:00
Reinier Balt
4a485558e2 Merge branch 'master' into rails4
Conflicts:
	Gemfile.lock
	config/routes.rb
2013-06-17 09:25:02 +02:00
Reinier Balt
56b884055f fix #1270. if start-from fits the recurrence pattern, the first todo should use the start-from date
this is use-case 2 mentioned in the ticket.
2013-06-11 23:38:30 +02:00
Reinier Balt
a8af880647 fix #1417. We now handle unblocking a todo that is part of a hidden project or context 2013-06-04 10:07:02 +02:00
Reinier Balt
2921746409 fix manual merge error 2013-06-03 15:21:19 +02:00
Reinier Balt
02d4afb724 fix #1429 by correctly handling tags with dots
This was a very old regression. This used to work before the rails 3.2 upgrade... Added tests
to prevent future unnoticed breakage
2013-06-03 15:20:13 +02:00
Reinier Balt
671f64b419 move to strong_parameters of rails4. 2013-05-27 12:44:31 +02:00
Reinier Balt
7465ecce26 Start using actionpack-xml_parser as a gem
XML param parsing was removed from rails 4. We may need to look into dropping support 
for xml api perhaps in favor of a good json api
2013-05-13 15:36:33 +02:00
Reinier Balt
08498fee4f fix failing tests
Includes a monkey patch for Arel that may need to be removed when 4.0.0 final ships
2013-05-13 15:35:21 +02:00
Reinier Balt
80974fb0d5 empty non-saved project caused rss builder to fail 2013-05-13 12:50:10 +02:00
Reinier Balt
1234abb266 taggable_type should be accessible for test 2013-05-13 12:32:41 +02:00
Reinier Balt
cd689dc0e8 remove using minimal_test_helper from test_helper.
It prevents you from running rake test:models or any rake test:xyz, causes by the require of 
test/unit
2013-05-13 12:10:41 +02:00
Reinier Balt
0bc9b0397a move tests to new directory 2013-05-11 23:13:16 +02:00
Reinier Balt
26a27e5cfe increase test coverage of some models 2013-05-04 15:22:29 +02:00
Reinier Balt
f891ee86fe fix clearing show_from fails
caused by slightly different (better) workings of aasm
2013-05-03 19:28:26 +02:00
Matt Rogers
883ea2b968 Move Project#create_from_todo to its own class
The point of this is to keep as many things out of the ActiveRecord
objects as possible and use them as just a thin database abstraction
layer.
2013-05-02 22:30:24 -05:00
Matt Rogers
98b188d1df Add tests for the ICS and XML views and fix them up 2013-04-30 20:38:10 -05:00
Matt Rogers
d1ff0daf6f Move the calendar to its own controller 2013-04-30 20:09:46 -05:00
Matt Rogers
1c2de3fd5a Remove codejunk
Extra whitespace, explicit returns, and an extra begin/end pair are all
gone.
2013-04-29 21:01:21 -05:00
Reinier Balt
010d0e9ba0 refactor creating todos in todos_controller 2013-04-29 15:15:48 +02:00
Reinier Balt
5ed69fc1a2 update gems and fix failures from new aasm
I'm not sure the test failures caused by reload not working are caused by the new aasm, 
perhaps the thread isolation is causing that...
2013-04-29 11:53:32 +02:00
Matt Rogers
8db5793bf6 Merge pull request #178 from TracksApp/rename-has-next-todo
Rename RecurringTodo#has_next_todo
2013-04-27 09:52:58 -07:00
Matt Rogers
6b8e745234 Use Todos::Calendar in the view 2013-04-26 23:23:56 -05:00
Matt Rogers
84e49c451c add a test for the TodosController#calendar 2013-04-26 23:07:49 -05:00
Matt Rogers
f0d71bdfbb Remove extra whitespace 2013-04-26 22:30:40 -05:00
Matt Rogers
c4bcc0996f Remove extra whitespace 2013-04-26 16:30:40 -05:00
Matt Rogers
88e7798db6 Rename RecurringTodo#has_next_todo to continues_recurring?
This clarifies the intent of the method.
2013-04-26 16:30:12 -05:00
Matt Rogers
036c34f266 Rename RecurringTodo#inc_occurences to increment_occurrences
This clarifies the method name and fixes a typo.
2013-04-26 16:20:42 -05:00
Reinier Balt
67247980ad fix failing tests 2013-04-11 11:04:07 +02:00
Dan Rice
59989d3127 Merge remote-tracking branch 'upstream/master' 2013-03-19 16:47:20 -04:00
Dan Rice
66a84e0b71 Fix error running functional tests under Ruby 2.0.0 2013-03-19 16:43:06 -04:00
Katrina Owen
a4ae0c03bf Fix failing tests 2013-03-18 21:54:19 -06:00
Katrina Owen
a690e4a4cd Extract methods in pie chart data model 2013-03-18 19:57:42 -06:00
Katrina Owen
961227da0c Extract pie chart data logic into model layer
Move most of the tests for this logic into the unit test layer.
2013-03-18 19:49:54 -06:00
Matt Rogers
0cd6656be2 Merge pull request #175 from kytrinyx/pie-chart-bug
Add heavy-handed tests against pie chart bug
2013-03-18 06:41:38 -07:00
Katrina Owen
4fe9003855 Tweak pie chart data tests 2013-03-18 07:25:00 -06:00
Reinier Balt
22b371ef8c do a big refactor of rendering collections of todos for home page, tag page, project page, context page 2013-03-18 12:36:40 +01:00