gitlab-org--gitlab-foss/spec/workers/reactive_caching_worker_spec.rb

20 lines
607 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require 'spec_helper'
describe ReactiveCachingWorker do
describe '#perform' do
context 'when user configured kubernetes from CI/CD > Clusters' do
let!(:cluster) { create(:cluster, :project, :provided_by_gcp) }
let(:project) { cluster.project }
let!(:environment) { create(:environment, project: project) }
2017-11-27 09:55:25 -05:00
it 'calls #exclusively_update_reactive_cache!' do
expect_any_instance_of(Environment).to receive(:exclusively_update_reactive_cache!)
2017-11-27 09:55:25 -05:00
described_class.new.perform("Environment", environment.id)
2017-11-27 09:55:25 -05:00
end
end
end
end