Feature #25988 » 25988-format_object.diff
| app/helpers/application_helper.rb (working copy) | ||
|---|---|---|
|
when 'Issue'
|
||
|
object.visible? && html ? link_to_issue(object) : "##{object.id}"
|
||
|
when 'Attachment'
|
||
|
html ? link_to_attachment(object, :download => true) : object.filename
|
||
|
html ? link_to_attachment(object) : object.filename
|
||
|
when 'CustomValue', 'CustomFieldValue'
|
||
|
if object.custom_field
|
||
|
f = object.custom_field.format.formatted_custom_value(self, object, html)
|
||
| test/integration/lib/redmine/field_format/attachment_format_test.rb (working copy) | ||
|---|---|---|
|
assert_equal 1, link.size
|
||
|
assert_equal "testfile.txt", link.text
|
||
|
# download the attachment
|
||
|
# preview the attachment
|
||
|
get link.attr('href')
|
||
|
assert_response :success
|
||
|
assert_equal "text/plain", response.content_type
|
||
|
assert_template :file
|
||
|
end
|
||
|
def test_create_without_attachment
|
||
- « Previous
- 1
- …
- 6
- 7
- 8
- Next »