Project

General

Profile

Feature #25988 » 25988-format_object.diff

Go MAEDA, 2017-06-11 07:02

View differences:

app/helpers/application_helper.rb (working copy)
198 198
    when 'Issue'
199 199
      object.visible? && html ? link_to_issue(object) : "##{object.id}"
200 200
    when 'Attachment'
201
      html ? link_to_attachment(object, :download => true) : object.filename
201
      html ? link_to_attachment(object) : object.filename
202 202
    when 'CustomValue', 'CustomFieldValue'
203 203
      if object.custom_field
204 204
        f = object.custom_field.format.formatted_custom_value(self, object, html)
test/integration/lib/redmine/field_format/attachment_format_test.rb (working copy)
82 82
    assert_equal 1, link.size
83 83
    assert_equal "testfile.txt", link.text
84 84

  
85
    # download the attachment
85
    # preview the attachment
86 86
    get link.attr('href')
87 87
    assert_response :success
88
    assert_equal "text/plain", response.content_type
88
    assert_template :file
89 89
  end
90 90

  
91 91
  def test_create_without_attachment
(8-8/8)