summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-05-23 14:58:39 -0500
committerDouwe Maan <douwe@selenight.nl>2017-05-23 14:58:39 -0500
commit02bb62dee5ca0896da9742926751e1fcbcd01e94 (patch)
tree05222693ff72f166dca2285230280794093c1bd4
parent35c14a5aebb9a143ee3f406cff6d33a4aab50653 (diff)
downloadgitlab-ce-dm-copy-gfm-when-parts-of-other-elements-are-selected.tar.gz
-rw-r--r--spec/features/copy_as_gfm_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/features/copy_as_gfm_spec.rb b/spec/features/copy_as_gfm_spec.rb
index be615519a09..860ab1a4c9c 100644
--- a/spec/features/copy_as_gfm_spec.rb
+++ b/spec/features/copy_as_gfm_spec.rb
@@ -66,6 +66,25 @@ describe 'Copy as GFM', feature: true, js: true do
GFM
)
+ aggregate_failures('an accidentally selected other element') do
+ gfm = 'Test comment with **Markdown!**'
+
+ html = <<-HTML.strip_heredoc
+ <li class="note">
+ <div class="md">
+ <p>
+ Test comment with <strong>Markdown!</strong>
+ </p>
+ </div>
+ </li>
+
+ <li class="note"></li>
+ HTML
+
+ output_gfm = html_to_gfm(html)
+ expect(output_gfm.strip).to eq(gfm.strip)
+ end
+
verify(
'InlineDiffFilter',