Commit graph

518 commits

Author SHA1 Message Date
Reinier Balt
a9fa955c33 move daily test to daily pattern test 2014-03-31 09:43:39 +02:00
Reinier Balt
b84adfc172 move recurrence text helpers into patterns. move next_date calculation into
respective models
2014-03-31 09:43:39 +02:00
Reinier Balt
cbdbb792a5 add basis tests for patterns and remove doubles from recurring_todo_test.rb 2014-03-31 09:43:39 +02:00
Reinier Balt
a7807a4b66 dry form_helper using meta programming.
not sure if this improves readability, but codeclimate should be happier...
2014-03-31 09:43:39 +02:00
Reinier Balt
5de96d7eda add some more tests 2014-03-31 09:43:39 +02:00
Reinier Balt
59a29c664a move form specific accessors out of model 2014-03-31 09:43:39 +02:00
Reinier Balt
29b815e998 move model validation into pattern classes and link from recurring_todo model 2014-03-31 09:43:39 +02:00
Reinier Balt
776a046465 move mapping of form attributes to model attributes from pattern to builder to make
pattern independent of form
2014-03-31 09:43:39 +02:00
Reinier Balt
c2c67f1640 use new model to handle updating of recurring todos 2014-03-31 09:43:39 +02:00
Reinier Balt
78c07d52b7 Start major refactoring of recurring_todos. Started with creating new recurring todos.
All current and new tests pass
2014-03-31 09:43:39 +02:00
Reinier Balt
39c52e03b4 fix failing tests
the date in fixtures is not set by timecop. That doesn't help here
2014-02-23 14:03:57 +01:00
Reinier Balt
1649d95374 update gemfile again and fix failing test 2014-01-31 17:44:54 +01:00
Reinier Balt
b15d195c45 fix test regressions. should run all tests before committing :-) 2014-01-26 15:10:36 +01:00
Reinier Balt
63af3bbcfa make todo_from_rich_message time zone aware. test was failing. 2014-01-26 15:05:27 +01:00
Reinier Balt
468274c5d1 fix tests for ruby 2.1 and add 2.1 to ci test matrix 2013-12-31 16:11:32 +01:00
Reinier Balt
17dca39d3a update gems and fix i18n and aasm deprecation warnings 2013-12-30 20:52:35 +01:00
Greg Sutcliffe
2f043911c6 Extend RichMessage format to include other data
Uses new Regex to detect:

 @ context
 ~ project
 > tickler-date
 < due-date
 # tag (repeatable)
 * (starred)
2013-10-16 21:25:47 +01:00
Matt Rogers
1441d53808 Compare against an array instead of joining them into a string
No need to create a string out of them to get a good comparison
2013-10-15 20:03:01 -05:00
Matt Rogers
9fd4b845de Don't depend on the environment in the test 2013-10-15 20:02:52 -05:00
Matt Rogers
bae4b2a5b7 Require 'timecop' explicitly
This works around a problem with bundler's autorequires when not using
a standard Rails environment.
2013-10-15 20:02:52 -05:00
Reinier Balt
edb2ad7077 add missing tests for todo 2013-09-25 16:22:06 +02:00
Reinier Balt
11bc4294a8 add tests for done_todos 2013-09-25 15:08:25 +02:00
Reinier Balt
406eb47db7 move coverage to ci rake task 2013-09-24 09:48:21 +02:00
Reinier Balt
ae11f09d2f fix calendar_test
todos in rest of month means all todos after next week in the current month. The test failed
if the todo was created in next week and that week being the last week in the month. In that
case the todo should not be returned by rest_of_month since it is in rest_of_week
2013-09-23 16:52:29 +02:00
Reinier Balt
bba86e51d7 re-add simplecov by request 2013-09-23 16:49:59 +02:00
Reinier Balt
07a3962d7d remove simplecov since we now have coverage reporting on Code Climate 2013-09-22 19:29:30 +02:00
Reinier Balt
067db90d58 various small refactorings 2013-09-22 17:34:58 +02:00
Greg Sutcliffe
8a2da01d51 Add Mailgun endpoint for receiving email tasks via Mailgun 2013-09-21 12:43:22 +01:00
Reinier Balt
daef1c440b improve integration test of cli scripts 2013-09-20 21:18:33 +02:00
Reinier Balt
4c73e260e3 add test for cli xml builder 2013-09-18 22:54:46 +02:00
Reinier Balt
62bc47b26b fix regression in recurring todos 2013-09-17 15:40:20 +02:00
Reinier Balt
76902e95c0 Get test coverage reporting on codeclimate 2013-09-16 09:40:41 +02:00
Reinier Balt
94114746e7 Merge pull request #209 from iangreenleaf/monthly_recurring_bug
Fix endlessly repeating monthly recurring todos
2013-09-15 00:48:40 -07:00
Ian Young
4cd8688d9a Fix failing test
As far as I can tell, this is how the test is intended to work, and how
it works in v2.2.2. If a recurring todo set to show on the date is
completed *on* the specified date, it will create a deferred one for the
*next* month.
2013-09-14 22:11:23 -07:00
Ian Young
a6c32889ce Bug repeating monthly recurring todos 2013-09-14 18:12:56 -07:00
Ian Young
aff7069c0e Fix bug assigning value from every_x_day input 2013-09-13 23:15:11 -07:00
Reinier Balt
0b38f3c43c clean up a rec todos test 2013-09-05 17:14:01 +02:00
Reinier Balt
fee1e3b504 fix failing test on timezones and remove debug message 2013-09-05 12:23:26 +02:00
Reinier Balt
cb46a8461e fix show_from not being clear when a todo comes from tickler 2013-09-05 12:21:43 +02:00
Reinier Balt
6e654c5d03 fix failing test 2013-09-05 10:53:16 +02:00
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