mirror of
https://github.com/redmine/redmine.git
synced 2025-11-09 23:06:05 +01:00
Show long text custom field changes as a diff (#15236).
git-svn-id: http://svn.redmine.org/redmine/trunk@13954 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -203,12 +203,25 @@ class IssuesHelperTest < ActionView::TestCase
|
||||
assert_match '6.30', show_detail(detail, true)
|
||||
end
|
||||
|
||||
test 'show_detail should not show values with a description attribute' do
|
||||
detail = JournalDetail.new(:property => 'attr', :prop_key => 'description',
|
||||
:old_value => 'Foo', :value => 'Bar')
|
||||
assert_equal 'Description updated', show_detail(detail, true)
|
||||
end
|
||||
|
||||
test 'show_detail should show old and new values with a custom field' do
|
||||
detail = JournalDetail.new(:property => 'cf', :prop_key => '1',
|
||||
:old_value => 'MySQL', :value => 'PostgreSQL')
|
||||
assert_equal 'Database changed from MySQL to PostgreSQL', show_detail(detail, true)
|
||||
end
|
||||
|
||||
test 'show_detail should not show values with a long text custom field' do
|
||||
field = IssueCustomField.create!(:name => "Long field", :field_format => 'text')
|
||||
detail = JournalDetail.new(:property => 'cf', :prop_key => field.id,
|
||||
:old_value => 'Foo', :value => 'Bar')
|
||||
assert_equal 'Long field updated', show_detail(detail, true)
|
||||
end
|
||||
|
||||
test 'show_detail should show added file' do
|
||||
detail = JournalDetail.new(:property => 'attachment', :prop_key => '1',
|
||||
:old_value => nil, :value => 'error281.txt')
|
||||
|
||||
Reference in New Issue
Block a user