@@ -1590,6 +1590,7 class Issue < ActiveRecord::Base | |||
|
1590 | 1590 | tracker.disabled_core_fields.each do |attribute| |
|
1591 | 1591 | send "#{attribute}=", nil |
|
1592 | 1592 | end |
|
1593 | self.done_ratio ||= 0 | |
|
1593 | 1594 | end |
|
1594 | 1595 | end |
|
1595 | 1596 | end |
@@ -70,6 +70,15 class IssueTest < ActiveSupport::TestCase | |||
|
70 | 70 | assert_nil issue.estimated_hours |
|
71 | 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 | 82 | def test_start_date_format_should_be_validated |
|
74 | 83 | set_language_if_valid 'en' |
|
75 | 84 | ['2012', 'ABC', '2012-15-20'].each do |invalid_date| |
General Comments 0
You need to be logged in to leave comments.
Login now