Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/workers/issue_rebalancing_worker_spec.rb')
-rw-r--r--spec/workers/issue_rebalancing_worker_spec.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/workers/issue_rebalancing_worker_spec.rb b/spec/workers/issue_rebalancing_worker_spec.rb
index 8b0fcd4bc5a..e5c6ac3f854 100644
--- a/spec/workers/issue_rebalancing_worker_spec.rb
+++ b/spec/workers/issue_rebalancing_worker_spec.rb
@@ -4,7 +4,21 @@ require 'spec_helper'
RSpec.describe IssueRebalancingWorker do
describe '#perform' do
- let_it_be(:issue) { create(:issue) }
+ let_it_be(:group) { create(:group) }
+ let_it_be(:project) { create(:project, group: group) }
+ let_it_be(:issue) { create(:issue, project: project) }
+
+ context 'when block_issue_repositioning is enabled' do
+ before do
+ stub_feature_flags(block_issue_repositioning: group)
+ end
+
+ it 'does not run an instance of IssueRebalancingService' do
+ expect(IssueRebalancingService).not_to receive(:new)
+
+ described_class.new.perform(nil, issue.project_id)
+ end
+ end
it 'runs an instance of IssueRebalancingService' do
service = double(execute: nil)