mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 15:50:13 +01:00
fix for the two issues in #852
* the end date is prefilled with an incorrect formatted date * if the radio for ends_on is not selected, but a date is entered, tracks incorrectly behaves as if ends_on was checked
This commit is contained in:
parent
f4f2573f98
commit
239b38cb15
4 changed files with 6 additions and 5 deletions
|
|
@ -155,7 +155,7 @@ class RecurringTodosControllerTest < ActionController::TestCase
|
|||
"recurring_period"=>"yearly",
|
||||
"recurring_show_days_before"=>"0",
|
||||
"recurring_target"=>"due_date",
|
||||
"start_from"=>"",
|
||||
"start_from"=>"1/10/2012", # adjust after 2012
|
||||
"weekly_every_x_week"=>"1",
|
||||
"weekly_return_monday"=>"w",
|
||||
"yearly_day_of_week"=>"0",
|
||||
|
|
@ -176,8 +176,8 @@ class RecurringTodosControllerTest < ActionController::TestCase
|
|||
new_todo = Todo.find_by_description("new recurring pattern")
|
||||
assert !new_todo.nil?
|
||||
|
||||
# the date should be 29 march 2009
|
||||
assert_equal Time.zone.local(2009,3,29), new_todo.due
|
||||
# the date should be 31 march 2013
|
||||
assert_equal Time.zone.local(2013,3,31), new_todo.due
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ class RecurringTodoTest < Test::Rails::TestCase
|
|||
assert_equal true, @every_day.has_next_todo(@in_three_days)
|
||||
assert_equal true, @every_day.has_next_todo(@in_four_days)
|
||||
@every_day.end_date = @in_four_days
|
||||
@every_day.ends_on = 'ends_on_end_date'
|
||||
assert_equal false, @every_day.has_next_todo(@in_four_days)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue