mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-31 22:38:49 +01:00
move model validation into pattern classes and link from recurring_todo model
This commit is contained in:
parent
776a046465
commit
29b815e998
7 changed files with 201 additions and 77 deletions
|
|
@ -277,7 +277,7 @@ class RecurringTodoTest < ActiveSupport::TestCase
|
|||
|
||||
def test_toggle_completion
|
||||
assert @yearly.active?
|
||||
assert @yearly.toggle_completion!
|
||||
assert @yearly.toggle_completion!, "toggle of completion should succeed"
|
||||
assert @yearly.completed?
|
||||
|
||||
# entering completed state should set completed_at
|
||||
|
|
@ -329,7 +329,7 @@ class RecurringTodoTest < ActiveSupport::TestCase
|
|||
assert_raise(Exception){ @every_month.valid? }
|
||||
|
||||
@yearly.recurrence_selector = 99
|
||||
assert_raise(Exception){ @yearly.valid? }
|
||||
assert_raise(RuntimeError){ @yearly.valid? }
|
||||
end
|
||||
|
||||
def test_every_n_the_day_must_be_filled
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue