]> source.dussan.org Git - redmine.git/commitdiff
Skip thumbnail tests if ImageMagick convert command is not available (#33226).
authorGo MAEDA <maeda@farend.jp>
Thu, 2 Apr 2020 08:04:15 +0000 (08:04 +0000)
committerGo MAEDA <maeda@farend.jp>
Thu, 2 Apr 2020 08:04:15 +0000 (08:04 +0000)
Patch by Pavel Rosický.

git-svn-id: http://svn.redmine.org/redmine/trunk@19640 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/gantts_controller_test.rb
test/functional/issues_controller_test.rb
test/helpers/journals_helper_test.rb
test/integration/api_test/attachments_test.rb
test/unit/attachment_test.rb

index ec73dd5ca7a0c154629b1d00b5c194bf6e888eb2..e1f9be8facd3223863942b68077bf4bd5ec628fd 100644 (file)
@@ -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,
index e27b3fdc9d28ef41a87cc8448cf1f850563c1187..edcf140685a085945681bea926401c27255e7c05 100644 (file)
@@ -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})
index 3c61388a1ae588a99824a252e9a58cf451e0c95f..a3475c6ab944eb2fc2c16dfbbe09916f6400ca95 100644 (file)
@@ -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!
 
index 85dd895c0b5eed118967be7c9f9a3a2eea38b01d..4d83195c4cac00fa2541e2025eefca3f72eec790 100644 (file)
@@ -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
index 5c32d1e759a1cadae181d946ffaf1f8796afa033..209775514bdc3aac765c3d4d78f2c0e06d6a7e3e 100644 (file)
@@ -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