mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 19:36:00 +01:00
Displays thumbnails of attached images of the issue view (#1006).
This behaviour can be turned on/off in Settings -> Display (off by default). Thumbnail size can be configured there too. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9933 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1155,7 +1155,33 @@ class IssuesControllerTest < ActionController::TestCase
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def test_show_with_thumbnails_enabled_should_display_thumbnails
|
||||
@request.session[:user_id] = 2
|
||||
|
||||
with_settings :thumbnails_enabled => '1' do
|
||||
get :show, :id => 14
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
assert_select 'div.thumbnails' do
|
||||
assert_select 'a[href=/attachments/16/testfile.png]' do
|
||||
assert_select 'img[src=/attachments/thumbnail/16]'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_show_with_thumbnails_disabled_should_not_display_thumbnails
|
||||
@request.session[:user_id] = 2
|
||||
|
||||
with_settings :thumbnails_enabled => '0' do
|
||||
get :show, :id => 14
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
assert_select 'div.thumbnails', 0
|
||||
end
|
||||
|
||||
def test_show_with_multi_custom_field
|
||||
field = CustomField.find(1)
|
||||
field.update_attribute :multiple, true
|
||||
|
||||
Reference in New Issue
Block a user