提交 a3eabcc2 编写于 作者: D Douwe Maan

Merge branch 'tc-fix-broken-plain-readme' into 'master'

Fix ProjectCacheWorker for plain READMEs

Closes #32540

See merge request !11506
require 'nokogiri'
module MarkupHelper
include ActionView::Helpers::TagHelper
include ActionView::Context
def plain?(filename)
Gitlab::MarkupHelper.plain?(filename)
end
......
......@@ -45,6 +45,18 @@ describe ProjectCacheWorker do
worker.perform(project.id, %w(readme))
end
context 'with plain readme' do
it 'refreshes the method caches' do
allow(MarkupHelper).to receive(:gitlab_markdown?).and_return(false)
allow(MarkupHelper).to receive(:plain?).and_return(true)
expect_any_instance_of(Repository).to receive(:refresh_method_caches).
with(%i(readme)).
and_call_original
worker.perform(project.id, %w(readme))
end
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册