disable-description-field_fixed-test.diff

Mischa The Evil, 2017-02-15 07:58

Download (1.57 KB)

View differences:

app/models/tracker.rb (working copy)
18 18
class Tracker < ActiveRecord::Base
19 19
  include Redmine::SafeAttributes
20 20

  
21
  CORE_FIELDS_UNDISABLABLE = %w(project_id tracker_id subject description priority_id is_private).freeze
21
  CORE_FIELDS_UNDISABLABLE = %w(project_id tracker_id subject priority_id is_private).freeze
22 22
  # Fields that can be disabled
23 23
  # Other (future) fields should be appended, not inserted!
24
  CORE_FIELDS = %w(assigned_to_id category_id fixed_version_id parent_issue_id start_date due_date estimated_hours done_ratio).freeze
24
  CORE_FIELDS = %w(assigned_to_id category_id fixed_version_id parent_issue_id start_date due_date estimated_hours done_ratio description).freeze
25 25
  CORE_FIELDS_ALL = (CORE_FIELDS_UNDISABLABLE + CORE_FIELDS).freeze
26 26

  
27 27
  before_destroy :check_integrity
test/unit/issue_test.rb (working copy)
810 810
    assert_include 'tracker_id', issue.safe_attribute_names
811 811
    assert_include 'status_id', issue.safe_attribute_names
812 812
    assert_include 'subject', issue.safe_attribute_names
813
    assert_include 'description', issue.safe_attribute_names
814 813
    assert_include 'custom_field_values', issue.safe_attribute_names
815 814
    assert_include 'custom_fields', issue.safe_attribute_names
816 815
    assert_include 'lock_version', issue.safe_attribute_names