summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-26 15:07:07 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-26 15:07:07 +0300
commit0093554ad6055a0843b0537557e8ca44d6ff2429 (patch)
tree14298c76b5866a9b9a99ad277cd18fb663aa0109 /spec
parent3cc26654d576ed6a0f6eb33980c41f1b66b5f1eb (diff)
downloadgitlab-ce-0093554ad6055a0843b0537557e8ca44d6ff2429.tar.gz
Add test and docs for markdown tables
Diffstat (limited to 'spec')
-rw-r--r--spec/helpers/gitlab_markdown_helper_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/helpers/gitlab_markdown_helper_spec.rb b/spec/helpers/gitlab_markdown_helper_spec.rb
index a4db8b4ff7e..d49247accc2 100644
--- a/spec/helpers/gitlab_markdown_helper_spec.rb
+++ b/spec/helpers/gitlab_markdown_helper_spec.rb
@@ -366,6 +366,15 @@ describe GitlabMarkdownHelper do
markdown(actual).should match(%r{Apply <em><a.+>!#{merge_request.iid}</a></em>})
end
+ it "should handle tables" do
+ actual = %Q{| header 1 | header 2 |
+| -------- | -------- |
+| cell 1 | cell 2 |
+| cell 3 | cell 4 |}
+
+ markdown(actual).should match(/\A<table/)
+ end
+
it "should leave code blocks untouched" do
helper.stub(:user_color_scheme_class).and_return(:white)