##// END OF EJS Templates
Merged r14241 (#19731)....
Jean-Philippe Lang -
r13865:010945b3d8f9
parent child
Show More
@@ -1590,6 +1590,7 class Issue < ActiveRecord::Base
1590 tracker.disabled_core_fields.each do |attribute|
1590 tracker.disabled_core_fields.each do |attribute|
1591 send "#{attribute}=", nil
1591 send "#{attribute}=", nil
1592 end
1592 end
1593 self.done_ratio ||= 0
1593 end
1594 end
1594 end
1595 end
1595 end
1596 end
@@ -70,6 +70,15 class IssueTest < ActiveSupport::TestCase
70 assert_nil issue.estimated_hours
70 assert_nil issue.estimated_hours
71 end
71 end
72
72
73 def test_create_with_all_fields_disabled
74 tracker = Tracker.find(1)
75 tracker.core_fields = []
76 tracker.save!
77
78 issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 3, :subject => 'test_create_with_all_fields_disabled')
79 assert_save issue
80 end
81
73 def test_start_date_format_should_be_validated
82 def test_start_date_format_should_be_validated
74 set_language_if_valid 'en'
83 set_language_if_valid 'en'
75 ['2012', 'ABC', '2012-15-20'].each do |invalid_date|
84 ['2012', 'ABC', '2012-15-20'].each do |invalid_date|
General Comments 0
You need to be logged in to leave comments. Login now