diff options
author | Go MAEDA <maeda@farend.jp> | 2020-04-02 08:04:15 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-04-02 08:04:15 +0000 |
commit | a24834fa77bc5bb932f70aab4755d764dacc979c (patch) | |
tree | 2a016f01a6718e064a3961949f813e442e136b9a /test | |
parent | 0f3cece5bb03a2bec9714a0fcd8bc936b8de706c (diff) | |
download | redmine-a24834fa77bc5bb932f70aab4755d764dacc979c.tar.gz redmine-a24834fa77bc5bb932f70aab4755d764dacc979c.zip |
Skip thumbnail tests if ImageMagick convert command is not available (#33226).
Patch by Pavel Rosický.
git-svn-id: http://svn.redmine.org/redmine/trunk@19640 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/gantts_controller_test.rb | 2 | ||||
-rw-r--r-- | test/functional/issues_controller_test.rb | 1 | ||||
-rw-r--r-- | test/helpers/journals_helper_test.rb | 1 | ||||
-rw-r--r-- | test/integration/api_test/attachments_test.rb | 1 | ||||
-rw-r--r-- | test/unit/attachment_test.rb | 1 |
5 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/gantts_controller_test.rb b/test/functional/gantts_controller_test.rb index ec73dd5ca..e1f9be8fa 100644 --- a/test/functional/gantts_controller_test.rb +++ b/test/functional/gantts_controller_test.rb @@ -155,7 +155,7 @@ class GanttsControllerTest < Redmine::ControllerTest assert @response.body.starts_with?('%PDF') end - if Object.const_defined?(:MiniMagick) + if Object.const_defined?(:MiniMagick) && convert_installed? def test_gantt_should_export_to_png get :show, :params => { :project_id => 1, diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index e27b3fdc9..edcf14068 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -2542,6 +2542,7 @@ class IssuesControllerTest < Redmine::ControllerTest end def test_show_with_thumbnails_enabled_should_display_thumbnails + skip unless convert_installed? @request.session[:user_id] = 2 with_settings :thumbnails_enabled => '1' do get(:show, :params => {:id => 14}) diff --git a/test/helpers/journals_helper_test.rb b/test/helpers/journals_helper_test.rb index 3c61388a1..a3475c6ab 100644 --- a/test/helpers/journals_helper_test.rb +++ b/test/helpers/journals_helper_test.rb @@ -32,6 +32,7 @@ class JournalsHelperTest < Redmine::HelperTest :versions def test_journal_thumbnail_attachments_should_return_thumbnailable_attachments + skip unless convert_installed? set_tmp_attachments_directory issue = Issue.generate! diff --git a/test/integration/api_test/attachments_test.rb b/test/integration/api_test/attachments_test.rb index 85dd895c0..4d83195c4 100644 --- a/test/integration/api_test/attachments_test.rb +++ b/test/integration/api_test/attachments_test.rb @@ -50,6 +50,7 @@ class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base end test "GET /attachments/:id.xml for image should include thumbnail_url" do + skip unless convert_installed? get '/attachments/16.xml', :headers => credentials('jsmith') assert_response :success assert_equal 'application/xml', @response.media_type diff --git a/test/unit/attachment_test.rb b/test/unit/attachment_test.rb index 5c32d1e75..209775514 100644 --- a/test/unit/attachment_test.rb +++ b/test/unit/attachment_test.rb @@ -444,6 +444,7 @@ class AttachmentTest < ActiveSupport::TestCase end def test_thumbnailable_should_be_true_for_images + skip unless convert_installed? assert_equal true, Attachment.new(:filename => 'test.jpg').thumbnailable? end |