summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2024-10-19 08:21:18 +0000
committerGo MAEDA <maeda@farend.jp>2024-10-19 08:21:18 +0000
commitffb78c12c35192aff8e13389577ef9564ab278ee (patch)
tree3a30945edd95acb6b5df41fc8a5992783646acfa /test
parentf1ae3eea67ac99d1c5b130fb0b46139bbe9f0837 (diff)
downloadredmine-ffb78c12c35192aff8e13389577ef9564ab278ee.tar.gz
redmine-ffb78c12c35192aff8e13389577ef9564ab278ee.zip
Fix invalid "theme-*" CSS class in body element when theme name contains spaces (#26778).
Patch by Go MAEDA (user:maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@23144 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/integration/lib/redmine/themes_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/integration/lib/redmine/themes_test.rb b/test/integration/lib/redmine/themes_test.rb
index f5fbc89b6..42cacd172 100644
--- a/test/integration/lib/redmine/themes_test.rb
+++ b/test/integration/lib/redmine/themes_test.rb
@@ -101,4 +101,12 @@ class ThemesTest < Redmine::IntegrationTest
ensure
Redmine::Utils.relative_url_root = ''
end
+
+ def test_body_css_class_with_spaces_in_theme_name
+ @theme.instance_variable_set(:@name, 'Foo bar baz')
+ get '/'
+
+ assert_response :success
+ assert_select 'body[class~="theme-Foo_bar_baz"]'
+ end
end