From f14bb942538c28850d4d971be48a0acfb06e1ad3 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 23 May 2017 14:58:39 -0500 Subject: Add spec --- spec/features/copy_as_gfm_spec.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/spec/features/copy_as_gfm_spec.rb b/spec/features/copy_as_gfm_spec.rb index 9318c56112b..740f60c05cc 100644 --- a/spec/features/copy_as_gfm_spec.rb +++ b/spec/features/copy_as_gfm_spec.rb @@ -78,6 +78,25 @@ describe 'Copy as GFM', feature: true, js: true do expect(output_gfm.strip).to eq(gfm.strip) end + aggregate_failures('an accidentally selected other element') do + gfm = 'Test comment with **Markdown!**' + + html = <<-HTML.strip_heredoc +
  • +
    +

    + Test comment with Markdown! +

    +
    +
  • + +
  • + HTML + + output_gfm = html_to_gfm(html) + expect(output_gfm.strip).to eq(gfm.strip) + end + verify( 'InlineDiffFilter', -- cgit v1.2.1