Defect #25118

ThemesTest#test_without_theme_js may fail if third-party theme is installed

Added by Go MAEDA 4 months ago. Updated 4 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Themes
Target version:3.4.0
Resolution:Fixed Affected version:

Description

test/unit/lib/redmine/themes_test.rb may fail if third party theme which has javascripts/theme.js is installed.

  1) Failure:
ThemesTest#test_without_theme_js [test//integration/lib/redmine/themes_test.rb:43]:
Expected exactly 0 elements matching "script[src^="/themes/redminecrm/javascripts/theme.js"]", found 1..
Expected: 0
  Actual: 1

This issue can be fixed by the following patch:

Index: test/integration/lib/redmine/themes_test.rb
===================================================================
--- test/integration/lib/redmine/themes_test.rb    (revision 16332)
+++ test/integration/lib/redmine/themes_test.rb    (working copy)
@@ -37,6 +37,8 @@
   end

   def test_without_theme_js
+    # simulate a state theme.js does not exists
+    @theme.javascripts.clear
     get '/'

     assert_response :success

Associated revisions

Revision 16347
Added by Jean-Philippe Lang 4 months ago

ThemesTest#test_without_theme_js may fail if third-party theme is installed (#25118).

Patch by Go MAEDA.

History

#1 Updated by Go MAEDA 4 months ago

  • Target version set to 3.4.0

#2 Updated by Jean-Philippe Lang 4 months ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Committed, thanks.

Also available in: Atom PDF