Commit fb96d801 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'issue#220040-fix-robocop-savebang-approval-rules' into 'master'

Fixed robocop offense for ee/spec/services/approval_rules/*

See merge request gitlab-org/gitlab!61829
parents 50a3b16b f365e4db
......@@ -72,8 +72,6 @@ Rails/SaveBang:
- 'ee/spec/models/visible_approvable_spec.rb'
- 'ee/spec/models/vulnerabilities/feedback_spec.rb'
- 'ee/spec/models/vulnerabilities/issue_link_spec.rb'
- 'ee/spec/services/approval_rules/finalize_service_spec.rb'
- 'ee/spec/services/approval_rules/update_service_spec.rb'
- 'ee/spec/services/ee/boards/issues/create_service_spec.rb'
- 'ee/spec/services/ee/boards/issues/list_service_spec.rb'
- 'ee/spec/services/ee/boards/lists/list_service_spec.rb'
......
---
title: Fixed robocop offense for ee/spec/services/approval_rules/*
merge_request: 61829
author: Suraj Tripathi @surajtripathy07
type: fixed
......@@ -45,7 +45,7 @@ RSpec.describe ApprovalRules::FinalizeService do
let(:merge_request) { create(:merged_merge_request, source_project: project, target_project: project) }
before do
merge_request.approval_rules.code_owner.create(name: 'Code Owner', rule_type: :code_owner)
merge_request.approval_rules.code_owner.create!(name: 'Code Owner', rule_type: :code_owner)
end
it 'copies project rules to MR, keep snapshot of group member by including it as part of users association' do
......@@ -65,7 +65,7 @@ RSpec.describe ApprovalRules::FinalizeService do
shared_examples 'idempotent approval tests' do |rule_type|
before do
project_rule.destroy
project_rule.destroy!
rule = create(:approval_project_rule, project: project, name: 'another rule', approvals_required: 2, rule_type: rule_type)
rule.users = [user1]
......
......@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe ApprovalRules::UpdateService do
let(:project) { create(:project) }
let(:user) { project.creator }
let(:approval_rule) { target.approval_rules.create(name: 'foo', approvals_required: 2) }
let(:approval_rule) { target.approval_rules.create!(name: 'foo', approvals_required: 2) }
shared_examples 'editable' do
let(:new_approvers) { create_list(:user, 2) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment