Commit f539c8a30631357daf58917a1968798f91c85c56

Authored by Dmitriy Zaporozhets
1 parent ddc44b90

Fix markdown tests

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing 1 changed file with 3 additions and 2 deletions   Show diff stats
spec/helpers/gitlab_markdown_helper_spec.rb
... ... @@ -378,9 +378,10 @@ describe GitlabMarkdownHelper do
378 378 it "should leave code blocks untouched" do
379 379 helper.stub(:user_color_scheme_class).and_return(:white)
380 380  
381   - helper.markdown("\n some code from $#{snippet.id}\n here too\n").should include("<div class=\"white\"><div class=\"highlight\"><pre><span class=\"n\">some</span> <span class=\"n\">code</span> <span class=\"n\">from</span> $#{snippet.id}\n<span class=\"n\">here</span> <span class=\"n\">too</span>\n</pre></div></div>")
  381 + target_html = "<div class=\"white\"><div class=\"highlight\"><pre><span class=\"n\">some</span> <span class=\"n\">code</span> <span class=\"n\">from</span> <span class=\"err\">$</span><span class=\"mi\">#{snippet.id}</span>"
382 382  
383   - helper.markdown("\n```\nsome code from $#{snippet.id}\nhere too\n```\n").should include("<div class=\"white\"><div class=\"highlight\"><pre><span class=\"n\">some</span> <span class=\"n\">code</span> <span class=\"n\">from</span> $#{snippet.id}\n<span class=\"n\">here</span> <span class=\"n\">too</span>\n</pre></div></div>")
  383 + helper.markdown("\n some code from $#{snippet.id}\n here too\n").should include(target_html)
  384 + helper.markdown("\n```\nsome code from $#{snippet.id}\nhere too\n```\n").should include(target_html)
384 385 end
385 386  
386 387 it "should leave inline code untouched" do
... ...