Skip to content

Commit

Permalink
Fix ordertimes controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Kagemaru committed Dec 9, 2020
1 parent 75c92a3 commit 20ee5d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/controllers/ordertimes_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_new_with_template

def test_new_with_template_and_workdate
template = worktimes(:wt_mw_puzzletime)

time = Time.zone.today
get :new, params: { template: template.id, work_date: time}
assert_equal time, assigns(:worktime).work_date
Expand Down Expand Up @@ -407,7 +407,8 @@ def test_create_invalid_part
}
}
assert_template 'split'
assert_match(/muss ausgefüllt werden/, assigns(:worktime).errors[:work_date].first)

assert assigns(:worktime).errors[:work_date].any? { |e| e.match? /muss ausgefüllt werden/ }
end

def test_destroy
Expand Down

0 comments on commit 20ee5d8

Please sign in to comment.