From f3502853fa7dcbf5f22d233480236a5149fc5e48 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 30 Jan 2018 08:54:37 +1100 Subject: [PATCH] correct spec regression --- spec/components/discourse_diff_spec.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/components/discourse_diff_spec.rb b/spec/components/discourse_diff_spec.rb index b089124e572..b797920b2f0 100644 --- a/spec/components/discourse_diff_spec.rb +++ b/spec/components/discourse_diff_spec.rb @@ -60,42 +60,42 @@ describe DiscourseDiff do describe "side_by_side_html" do it "returns two empty divs when no content is diffed" do - expect(DiscourseDiff.new("", "").side_by_side_html).to eq("
") + expect(DiscourseDiff.new("", "").side_by_side_html).to eq("
") end it "returns the diffed content on both sides when there is no difference" do before = after = "

this is a paragraph

" - expect(DiscourseDiff.new(before, after).side_by_side_html).to eq("

this is a paragraph

this is a paragraph

") + expect(DiscourseDiff.new(before, after).side_by_side_html).to eq("

this is a paragraph

this is a paragraph

") end it "adds tags around added text on the right div" do before = "

this is a paragraph

" after = "

this is a great paragraph

" - expect(DiscourseDiff.new(before, after).side_by_side_html).to eq("

this is a paragraph

this is a great paragraph

") + expect(DiscourseDiff.new(before, after).side_by_side_html).to eq("

this is a paragraph

this is a great paragraph

") end it "adds tags around removed text on the left div" do before = "

this is a great paragraph

" after = "

this is a paragraph

" - expect(DiscourseDiff.new(before, after).side_by_side_html).to eq("

this is a great paragraph

this is a paragraph

") + expect(DiscourseDiff.new(before, after).side_by_side_html).to eq("

this is a great paragraph

this is a paragraph

") end it "adds .diff-ins class when a paragraph is added" do before = "

this is the first paragraph

" after = "

this is the first paragraph

this is the second paragraph

" - expect(DiscourseDiff.new(before, after).side_by_side_html).to eq("

this is the first paragraph

this is the first paragraph

this is the second paragraph

") + expect(DiscourseDiff.new(before, after).side_by_side_html).to eq("

this is the first paragraph

this is the first paragraph

this is the second paragraph

") end it "adds .diff-del class when a paragraph is removed" do before = "

this is the first paragraph

this is the second paragraph

" after = "

this is the second paragraph

" - expect(DiscourseDiff.new(before, after).side_by_side_html).to eq("

this is the first paragraph

this is the second paragraph

this is the second paragraph

") + expect(DiscourseDiff.new(before, after).side_by_side_html).to eq("

this is the first paragraph

this is the second paragraph

this is the second paragraph

") end it "does not break diff on character references" do before = "

'

" after = "

" - expect(DiscourseDiff.new(before, after).side_by_side_html).to eq("

'

") + expect(DiscourseDiff.new(before, after).side_by_side_html).to eq("

'

") end end