diff --git a/test/controllers/ordertimes_controller_test.rb b/test/controllers/ordertimes_controller_test.rb index 511fcc0a0..805aa301e 100644 --- a/test/controllers/ordertimes_controller_test.rb +++ b/test/controllers/ordertimes_controller_test.rb @@ -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 @@ -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