summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-18 16:41:54 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-18 16:41:54 +0000
commit1e8a9da131686eb327d3ee3e31f5b3ac6b1b68bf (patch)
treee9f71339d76b0ab9c9badfa8a1e5c38fcf5bc6b6 /test/unit
parent2770e285358a8ae1e39cc7f594e1ccf8cfa417c3 (diff)
downloadredmine-1e8a9da131686eb327d3ee3e31f5b3ac6b1b68bf.tar.gz
redmine-1e8a9da131686eb327d3ee3e31f5b3ac6b1b68bf.zip
Handle the case of a text formatter that doesn't support section edit (#2222).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7831 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/lib/redmine/wiki_formatting.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/wiki_formatting.rb b/test/unit/lib/redmine/wiki_formatting.rb
index 606642e1f..909acdea7 100644
--- a/test/unit/lib/redmine/wiki_formatting.rb
+++ b/test/unit/lib/redmine/wiki_formatting.rb
@@ -42,4 +42,14 @@ EXPECTED
assert_equal expected.gsub(%r{[\r\n\t]}, ''), Redmine::WikiFormatting::NullFormatter::Formatter.new(raw).to_html.gsub(%r{[\r\n\t]}, '')
end
+
+ def test_supports_section_edit
+ with_settings :text_formatting => 'textile' do
+ assert_equal true, Redmine::WikiFormatting.supports_section_edit?
+ end
+
+ with_settings :text_formatting => '' do
+ assert_equal false, Redmine::WikiFormatting.supports_section_edit?
+ end
+ end
end