Make sure the `gfm` helper passes the required options
This adds some duplication, but this helper is temporary.
This commit is contained in:
parent
c104f4d590
commit
2930041886
|
@ -52,7 +52,7 @@ module GitlabMarkdownHelper
|
|||
path: @path,
|
||||
project: @project,
|
||||
project_wiki: @project_wiki,
|
||||
ref: @ref,
|
||||
ref: @ref
|
||||
)
|
||||
|
||||
Gitlab::Markdown.render(text, context)
|
||||
|
@ -61,6 +61,14 @@ module GitlabMarkdownHelper
|
|||
# TODO (rspeicher): Remove all usages of this helper and just call `markdown`
|
||||
# with a custom pipeline depending on the content being rendered
|
||||
def gfm(text, options = {})
|
||||
options.merge!(
|
||||
current_user: current_user,
|
||||
path: @path,
|
||||
project: @project,
|
||||
project_wiki: @project_wiki,
|
||||
ref: @ref
|
||||
)
|
||||
|
||||
Gitlab::Markdown.gfm(text, options)
|
||||
end
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ describe "GitLab Flavored Markdown", feature: true do
|
|||
it "should render details in issues#show" do
|
||||
visit namespace_project_issue_path(project.namespace, project, @issue)
|
||||
|
||||
expect(page).to have_link("@#{fred.username}")
|
||||
expect(page).to have_link(fred.to_reference)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue