Commit graph

450 commits

Author SHA1 Message Date
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
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