Commit graph

92 commits

Author SHA1 Message Date
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
053e3fc8d6 Guard against the case days stale can be negative 2013-03-10 22:48:27 -05:00
Matt Rogers
c1c81d7653 Remove some of the time objects we no longer need 2013-03-10 13:55:21 -05:00
Matt Rogers
809154332f Remove the fake preferences object
It's no longer needed since we're not using the preferences in this
object anymore.
2013-03-10 13:47:26 -05:00
Matt Rogers
43275e064e Refactor the calculation for staleness
Provide the number of days that the todo was stale instead of a class
name to use in the view.

We'll use the number of days stale in the helper to determine the class
name
2013-03-10 13:46:22 -05:00
Matt Rogers
8ffe3cacca Move the fakes so that they're namespaced by the test
Prevents errors since the names clash with names used in other tests.
2013-03-09 22:38:38 -06:00
Matt Rogers
ccf5323588 Encapsulate the concept of staleness into its own class
Extract it from a single helper method and wrap it in a method object.
This lets us add tests around it and then (later) split the domain
concerns from the view concerns.
2013-03-09 22:38:38 -06:00
Katrina Owen
e56fa5740a Make test name reflect actual data 2013-03-02 16:20:57 -05:00
Katrina Owen
c4433a5ea9 Don't round in ttc.min_sec method
This fixes a bug where it would round 1.8 days up to
2 days, and still display the extra hours in addition.
2013-03-02 16:16:45 -05:00
Katrina Owen
03282638af Move calculation out of view 2013-03-02 16:16:45 -05:00
Katrina Owen
62336f94cd Move time to complete stats into separate class
This separates out the calculations from the queries so we can get
decent tests around them.
2013-03-02 16:16:45 -05:00
Katrina Owen
3f496db4b4 Split up the font size calculation
The font size is a view concern, but the relative size belongs in the
model layer.
2013-03-02 07:14:52 -05:00
Matt Rogers
8b0f3e986a Merge branch 'tag-cloud' of https://github.com/kytrinyx/tracks 2013-03-01 16:49:53 -06:00
Katrina Owen
a13199cdda Add unit test for tag cloud 2013-03-01 16:03:35 -05:00
Katrina Owen
63fb7a589c Add test for tag cloud query 2013-03-01 13:26:59 -05:00
Reinier Balt
acab98d4c7 fix failing tests 2013-03-01 16:22:29 +01:00
Reinier Balt
a5031f2069 add test for better unit coverage of project 2013-03-01 16:22:29 +01:00
Reinier Balt
bf3a1e653a increate test coverage for user and project model 2013-03-01 16:22:29 +01:00
Reinier Balt
99eed9f638 add state machine to context including a closed state 2013-03-01 16:22:29 +01:00
Reinier Balt
ef91dd0c64 another set of dynamic finder migrations. All non-cucumber tests pass 2013-02-27 11:50:49 +01:00
Reinier Balt
583664be36 remove some dynamic finders (they are deprecated for rails4) and add test for untested method of context.rb 2013-02-25 10:21:04 +01:00
Katrina Owen
0b733b6183 Override #to_s on Tag for simplified joining 2013-02-19 08:47:47 -07:00
Katrina Owen
95a4ed6e4a Add Tag#label method 2013-02-18 15:12:53 -07:00
Katrina Owen
f28ff70f77 Find tag by lowercase name in tag test
The sqlite3 database is case sensitive, so searching for 'UPPER' when
the tag name has been changed to 'upper' before saving it will result in
an empty tag.
2013-02-17 19:41:28 -07:00
Reinier Balt
dd83040ea0 fix #1305 and #1309. Only check on show_from in the past when you change the show_from. This will not prevent a save of the todo when another change is made and show_from has some old date 2012-08-26 17:33:51 +02:00
Matt Rogers
b01c7878d1 Push conversion of a todo to a project down.
Refactor the conversion of a todo to a project and move it from the
TodosController to the Project model.
2012-08-14 19:33:54 -05:00
tim madden
51da342cdc harmonizing todo_tag_list and tag_list, using just the shorter tag_list 2012-06-27 13:56:56 -05:00
Reinier Balt
63175c115b all non-cucumber tests are passing 2012-04-30 13:56:41 +02:00
Reinier Balt
13b58f3a10 all unit and functional tests are passing 2012-04-30 13:56:40 +02:00
Reinier Balt
fd4fb6df9e get all unit tests running again. Seems we have some pretty old code in there :-) 2012-04-30 13:56:37 +02:00
Reinier Balt
a83c8b3f92 initial upgrade to rails 3.2.3 2012-04-30 13:56:33 +02:00
Reinier Balt
12d8915eda Get all non-cucumber tests passing 2012-04-12 12:47:25 +02:00
Reinier Balt
1a6edbe7c2 add some basic tests for tags noew we cannot rely on a tested gem 2012-04-11 13:39:12 +02:00
Reinier Balt
dcb155d90d fix #1271. Don't block an already blocked todo. Create tests for this case 2012-04-08 15:19:42 +02:00
Matt Rogers
67b8a11600 Merge pull request #62 from Popsch/review_tests_rebase
cucumber tests for the review mode
2012-02-10 08:27:54 -08:00
Matt Rogers
e7268fbaa2 Remove the double-quote custom validation
Rails has had SQL injection prevention since at least 2009 so we don't
need our version of it anymore.

Fixes ticket #1237
2012-02-02 22:28:26 -06:00
Sebastian Fischmeister
d14a2a808d cucumber tests for the review mode 2012-01-30 09:56:58 -05:00
Reinier Balt
f74370aab5 first refactoring of stats controller 2012-01-20 23:34:58 +01:00
Reinier Balt
58d8bc56d1 fix #827. You can now select todos with tags using OR and AND
/todos/tag/tagA,tagB?and=tagC will select all todos with (tagA or tagB) AND tagC
2011-10-28 19:33:51 +02:00
Jan Stępień
e5708f5ce7 Authenticate users with deprecated SHA-1 passwords 2011-09-07 16:06:02 +02:00
Jan Stępień
8e23d11054 Added User.uses_deprecated_password? method 2011-09-07 16:06:02 +02:00
Jan Stępień
95f0f71441 Hash passwords with BCrypt instead of SHA1
BCrypt is regarded as a more secure alternative to hashing using message
digest algorithms, such as MD5 and SHA families [0, 1, 2]. Apart from
built-in salting it is adaptable to the increasing power of modern
processing units, which makes it more secure against brute-force cracking.

This commit makes all passwords hashed using BCrypt. The session tokens
remain generated using SHA1. Tests were updated, `rake test:units` and
`rake test:functionals` didn't report any regressions.

[0] http://bcrypt.sourceforge.net/
[1] http://en.wikipedia.org/w/index.php?title=Bcrypt&oldid=439692871
[2] eab1c72/README.md
2011-09-07 16:05:52 +02:00
Matt Rogers
55bf457740 Allow projects to have commas in their name.
This removes the validation that checks to make sure there is no comma
in the name, and updates the tests to match.
2011-09-01 23:12:26 -05:00
Reinier Balt
c6c51ee83c fix failing specs 2011-08-16 11:49:04 +02:00
Reinier Balt
8546ae5dfa fix test failures after the changes and refactorings 2011-07-09 17:19:12 +02:00
Reinier Balt
01057af684 start modifying done view and do some refactoring 2011-07-09 17:19:11 +02:00
Reinier Balt
056dbf08a7 remove vendored gem and fix state model. Some old hacks did not work anymore on the newer aasm. reverted the hacks and fixed some tests 2011-06-10 23:17:22 +02:00
Stefan Richter
00819ce27b migrating to aasm - code part 2011-06-10 23:17:19 +02:00
Reinier Balt
91eeb0c6aa update require statements to fix path issue 2011-06-09 14:49:36 +02:00