1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-01 21:29:40 +00:00

code layout clean up test/unit/time_entry_test.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18770 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-10-19 12:25:11 +00:00
parent 5b18b24309
commit bb2f49712e

View File

@ -230,8 +230,12 @@ class TimeEntryTest < ActiveSupport::TestCase
def test_create_with_required_issue_id_and_comment_should_be_validated
set_language_if_valid 'en'
with_settings :timelog_required_fields => ['issue_id', 'comments'] do
entry = TimeEntry.new(:project => Project.find(1), :spent_on => Date.today, :author => User.find(1), :user => User.find(1), :activity => TimeEntryActivity.first, :hours => 1)
entry = TimeEntry.new(:project => Project.find(1),
:spent_on => Date.today,
:author => User.find(1),
:user => User.find(1),
:activity => TimeEntryActivity.first,
:hours => 1)
assert !entry.save
assert_equal ["Comment cannot be blank", "Issue cannot be blank"], entry.errors.full_messages.sort
end