mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 03:15:57 +01:00
Dynamic generation of supported code highlighting languages in help section (#40681).
Patch by Go MAEDA (@maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@22840 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -87,5 +87,13 @@ class HelpControllerTest < Redmine::ControllerTest
|
||||
assert_response :success
|
||||
|
||||
assert_select 'h1', :text => "List of languages supported by Redmine code highlighter"
|
||||
|
||||
# 1-based index + 1 for the header row
|
||||
index = Rouge::Lexer.all.sort_by(&:tag).index(Rouge::Lexers::Ruby) + 2
|
||||
assert_select "table tr:nth-of-type(#{index})" do
|
||||
assert_select '>td:nth-of-type(1)', :text => 'ruby'
|
||||
assert_select '>td:nth-of-type(2)', :text => /The Ruby programming language/
|
||||
assert_select '>td:nth-of-type(2)', :text => /\[aliases: rb\]/
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user