summaryrefslogtreecommitdiff
path: root/spec/workers/cluster_project_configure_worker_spec.rb
blob: afdea55adf4009632d69f3d46a8c41d36af082af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

require 'spec_helper'

describe ClusterProjectConfigureWorker, '#perform' do
  let(:worker) { described_class.new }

  context 'ci_preparing_state feature is enabled' do
    let(:cluster) { create(:cluster) }

    before do
      stub_feature_flags(ci_preparing_state: true)
    end

    it 'does not configure the cluster' do
      expect(Clusters::RefreshService).not_to receive(:create_or_update_namespaces_for_project)

      described_class.new.perform(cluster.id)
    end
  end
end