Skip to content
代码片段 群组 项目
未验证 提交 c213cc16 编辑于 作者: Martin Čavoj's avatar Martin Čavoj
浏览文件

Exclude any_approver rule from being marked as invalid

Changelog: fixed
EE: true
上级 1c8dae6e
No related branches found
No related tags found
无相关合并请求
...@@ -91,7 +91,7 @@ def approved? ...@@ -91,7 +91,7 @@ def approved?
end end
def invalid_rule? def invalid_rule?
approvals_required > 0 && unactioned_approvers.size <= 0 !any_approver? && approvals_required > 0 && unactioned_approvers.size <= 0
end end
def allow_merge_when_invalid? def allow_merge_when_invalid?
......
...@@ -93,6 +93,14 @@ ...@@ -93,6 +93,14 @@
end end
end end
context 'when rule is any_approver and approvals are required' do
let(:rule) { create(:any_approver_rule, merge_request: merge_request, approvals_required: 1) }
it 'return false' do
expect(subject.invalid_rule?).to eq(false)
end
end
context 'when there are unactioned approvers and approvals are required' do context 'when there are unactioned approvers and approvals are required' do
let(:approvals_required) { 1 } let(:approvals_required) { 1 }
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册