Patch #33226

Skip thumbnail tests if ImageMagick convert command is not available

Added by Pavel Rosický 5 months ago. Updated 4 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Code cleanup/refactoring
Target version:4.2.0

Description

Failure:
IssuesControllerTest#test_show_with_thumbnails_enabled_should_display_thumbnails [/test/functional/issues_controller_test.rb:2533]:
Expected at least 1 element matching "div.thumbnails", found 0..
Expected 0 to be >= 1.
...

it shouldn't fail if ImageMagick isn't available

convert_available.patch Magnifier (1.82 KB) Pavel Rosický, 2020-03-31 19:17

convert_available-v2.patch Magnifier (2.56 KB) Go MAEDA, 2020-04-01 02:57


Related issues

Related to Redmine - Feature #1006: Display thumbnails of attached images Closed 2008-04-07

Associated revisions

Revision 19640
Added by Go MAEDA 4 months ago

Skip thumbnail tests if ImageMagick convert command is not available (#33226).

Patch by Pavel Rosický.

History

#1 Updated by Go MAEDA 5 months ago

  • Related to Feature #1006: Display thumbnails of attached images added

#2 Updated by Go MAEDA 5 months ago

Thank you for the fix. I found that gantts_controller_test.rb should also be fixed. Attached the updated patch.

Error:
GanttsControllerTest#test_gantt_should_export_to_png:
MiniMagick::Error: You must have ImageMagick or GraphicsMagick installed
    lib/redmine/helpers/gantt.rb:381:in `to_image'
    app/controllers/gantts_controller.rb:44:in `block (2 levels) in show'
    app/controllers/gantts_controller.rb:42:in `show'
    lib/redmine/sudo_mode.rb:64:in `sudo_mode'
    test/functional/gantts_controller_test.rb:160:in `test_gantt_should_export_to_png'

bin/rails test test/functional/gantts_controller_test.rb:159

#3 Updated by Go MAEDA 4 months ago

  • Subject changed from Skip thumbnail tests if convert isn't available to Skip thumbnail tests if ImageMagick convert command is not available
  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patch. Thank you.

Also available in: Atom PDF