mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-10 09:24:22 +01:00
Refactored TodosController#create method by introducing class to make it easier to work with the creation params.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@628 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
11fb7c5b0e
commit
6156f26c47
7 changed files with 228 additions and 36 deletions
|
|
@ -19,5 +19,17 @@ class PreferenceTest < Test::Rails::TestCase
|
|||
assert @other_user.preference.show_project_on_todo_done
|
||||
assert !@admin_user.preference.show_project_on_todo_done
|
||||
end
|
||||
|
||||
def test_parse_date
|
||||
assert_equal Date.new(2007, 5, 20).to_s, @admin_user.preference.parse_date('20/5/2007').to_s
|
||||
end
|
||||
|
||||
def test_parse_date_returns_nil_if_string_is_empty
|
||||
assert_nil @admin_user.preference.parse_date('')
|
||||
end
|
||||
|
||||
def test_parse_date_returns_nil_if_string_is_nil
|
||||
assert_nil @admin_user.preference.parse_date(nil)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue