markdown("\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. #{@commit.id} Nam pulvinar sapien eget odio adipiscing at faucibus orci vestibulum.\n").should=="<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. #{link_to@commit.id,project_commit_path(@project,:id=>@commit.id),:title=>"Commit: #{@commit.author_name} - #{@commit.title}",:class=>"gfm gfm-commit "} Nam pulvinar sapien eget odio adipiscing at faucibus orci vestibulum.</p>\n"
end
it"should handle references in headers"do
markdown("\n# Working around ##{@issue.id} for now\n## Apply !#{@merge_request.id}").should=="<h1>Working around #{link_to"##{@issue.id}",project_issue_path(@project,@issue),:title=>"Issue: #{@issue.title}",:class=>"gfm gfm-issue "} for now</h1>\n\n<h2>Apply #{link_to"!#{@merge_request.id}",project_merge_request_path(@project,@merge_request),:title=>"Merge Request: #{@merge_request.title}",:class=>"gfm gfm-merge_request "}</h2>\n"
end
it"should handle references in lists"do
markdown("\n* dark: ##{@issue.id}\n* light by @#{@other_user.name}\n").should=="<ul>\n<li>dark: #{link_to"##{@issue.id}",project_issue_path(@project,@issue),:title=>"Issue: #{@issue.title}",:class=>"gfm gfm-issue "}</li>\n<li>light by #{link_to"@#{@other_user.name}",project_team_member_path(@project,@member),:class=>"gfm gfm-team_member "}</li>\n</ul>\n"