Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-05-24 22:25:59 +0300
committerFilipa Lacerda <filipa@gitlab.com>2017-05-24 22:25:59 +0300
commitc013d23d6320487cf293891f7c6b213cab816980 (patch)
tree14f02d12a05a3558c5452481d86b72df2516ac1d /spec
parent8763022d2bfa81fdc6ceab27f4530107e0ceaa0c (diff)
parent6ec1f1a7381565e01241d7e10067862e13cf8183 (diff)
Merge branch 'dm-copy-as-gfm-without-empty-elements' into 'master'
Don't copy empty elements that were not selected on purpose as GFM See merge request !11520
Diffstat (limited to 'spec')
-rw-r--r--spec/features/copy_as_gfm_spec.rb16
1 files changed, 13 insertions, 3 deletions
diff --git a/spec/features/copy_as_gfm_spec.rb b/spec/features/copy_as_gfm_spec.rb
index 43ea36c3cdd..9318c56112b 100644
--- a/spec/features/copy_as_gfm_spec.rb
+++ b/spec/features/copy_as_gfm_spec.rb
@@ -51,7 +51,6 @@ describe 'Copy as GFM', feature: true, js: true do
To see how GitLab looks please see the [features page on our website](https://about.gitlab.com/features/).
-
- Manage Git repositories with fine grained access controls that keep your code secure
- Perform code reviews and enhance collaboration with merge requests
@@ -66,6 +65,19 @@ describe 'Copy as GFM', feature: true, js: true do
GFM
)
+ aggregate_failures('an accidentally selected empty element') do
+ gfm = '# Heading1'
+
+ html = <<-HTML.strip_heredoc
+ <h1>Heading1</h1>
+
+ <h2></h2>
+ HTML
+
+ output_gfm = html_to_gfm(html)
+ expect(output_gfm.strip).to eq(gfm.strip)
+ end
+
verify(
'InlineDiffFilter',
@@ -352,7 +364,6 @@ describe 'Copy as GFM', feature: true, js: true do
<<-GFM.strip_heredoc,
- Nested
-
- Lists
GFM
@@ -375,7 +386,6 @@ describe 'Copy as GFM', feature: true, js: true do
<<-GFM.strip_heredoc,
1. Nested
-
1. Numbered lists
GFM