mirror of
https://github.com/meineerde/redmine.git
synced 2026-03-10 19:23:06 +00:00
Merged r17428 from trunk to 3.4-stable (#29038).
git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@17429 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
4cd518cd4c
commit
a3570ff62b
@ -156,7 +156,7 @@ class Attachment < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def title
|
||||
title = filename.to_s
|
||||
title = filename.dup
|
||||
if description.present?
|
||||
title << " (#{description})"
|
||||
end
|
||||
|
||||
@ -262,6 +262,7 @@ class AttachmentTest < ActiveSupport::TestCase
|
||||
|
||||
a = Attachment.new(:filename => "test.png", :description => "Cool image")
|
||||
assert_equal "test.png (Cool image)", a.title
|
||||
assert_equal "test.png", a.filename
|
||||
end
|
||||
|
||||
def test_new_attachment_should_be_editable_by_author
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user