diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-26 15:07:07 +0300 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-26 15:07:07 +0300 |
| commit | 0093554ad6055a0843b0537557e8ca44d6ff2429 (patch) | |
| tree | 14298c76b5866a9b9a99ad277cd18fb663aa0109 /spec | |
| parent | 3cc26654d576ed6a0f6eb33980c41f1b66b5f1eb (diff) | |
| download | gitlab-ce-0093554ad6055a0843b0537557e8ca44d6ff2429.tar.gz | |
Add test and docs for markdown tables
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/helpers/gitlab_markdown_helper_spec.rb | 9 |
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) |
