Project

General

Profile

Defect #28409 » tests.patch

Tomomi Yuzuriha, 2018-05-28 07:07

View differences:

test/functional/issues_controller_test.rb
end
end
end
def test_show_should_display_total_estimated_hours_even_if_estimated_hours_field_is_disabled
issue = Issue.find(1)
tracker = issue.tracker
tracker.core_fields = Tracker::CORE_FIELDS - ['estimated_hours']
tracker.save!
assert issue.disabled_core_fields.include?('estimated_hours')
assert issue.total_estimated_hours.blank?
get :show, :params => {
:id => issue.id
}
assert_select "div.estimated-hours.attribute div.value", false
Issue.create!(:project_id => 1, :author_id => 1, :tracker_id => 2, :parent_issue_id => issue.id, :subject => 'Child Issue', :estimated_hours => 4.50)
issue.reload
assert_not issue.total_estimated_hours.blank?
get :show, :params => {
:id => issue.id
}
assert_select "div.estimated-hours.attribute div.value", true, :text => /4.50/
end
end
(3-3/3)