Fixed tests

This commit is contained in:
Stefan Tatschner 2015-01-15 12:19:34 +01:00
parent bf079c24af
commit 089516209c
3 changed files with 4 additions and 3 deletions

View file

@ -26,7 +26,8 @@ describe EventsHelper do
it 'should display the first line of a code block' do
input = "```\nCode block\nwith two lines\n```"
expected = '<pre><code class="">Code block...</code></pre>'
expected = '<pre class="code highlight white plaintext"><code>' \
'Code block...</code></pre>'
expect(event_note(input)).to match(expected)
end

View file

@ -566,7 +566,7 @@ describe GitlabMarkdownHelper do
it "should leave code blocks untouched" do
helper.stub(:user_color_scheme_class).and_return(:white)
target_html = "\n<div class=\"highlighted-data white\">\n <div class=\"highlight\">\n <pre><code class=\"\">some code from $#{snippet.id}\nhere too\n</code></pre>\n </div>\n</div>\n\n"
target_html = "<pre class=\"code highlight white plaintext\"><code>some code from $40\nhere too\n</code></pre>\n"
helper.markdown("\n some code from $#{snippet.id}\n here too\n").should == target_html
helper.markdown("\n```\nsome code from $#{snippet.id}\nhere too\n```\n").should == target_html

View file

@ -36,7 +36,7 @@ describe WikiPage do
end
it "sets the version attribute" do
@wiki_page.version.should be_a Grit::Commit
@wiki_page.version.should be_a Gollum::Git::Commit
end
end
end