2019-07-07 11:18:12 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe ReactiveCachingWorker do
|
2018-03-17 18:26:18 +05:30
|
|
|
let(:service) { project.deployment_platform }
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
describe '#perform' do
|
2018-03-17 18:26:18 +05:30
|
|
|
context 'when user configured kubernetes from CI/CD > Clusters' do
|
|
|
|
let!(:cluster) { create(:cluster, :project, :provided_by_gcp) }
|
|
|
|
let(:project) { cluster.project }
|
|
|
|
|
|
|
|
it 'calls #exclusively_update_reactive_cache!' do
|
|
|
|
expect_any_instance_of(Clusters::Platforms::Kubernetes).to receive(:exclusively_update_reactive_cache!)
|
|
|
|
|
|
|
|
described_class.new.perform("Clusters::Platforms::Kubernetes", service.id)
|
|
|
|
end
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|