2019-03-30 07:15:48 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-12-17 04:09:50 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe ReactiveCachingWorker do
|
|
|
|
describe '#perform' do
|
2017-11-27 12:48:54 +00:00
|
|
|
context 'when user configured kubernetes from CI/CD > Clusters' do
|
|
|
|
let!(:cluster) { create(:cluster, :project, :provided_by_gcp) }
|
|
|
|
let(:project) { cluster.project }
|
2019-05-22 18:55:15 +00:00
|
|
|
let!(:environment) { create(:environment, project: project) }
|
2017-11-27 12:48:54 +00:00
|
|
|
|
2017-11-27 14:55:25 +00:00
|
|
|
it 'calls #exclusively_update_reactive_cache!' do
|
2019-05-22 18:55:15 +00:00
|
|
|
expect_any_instance_of(Environment).to receive(:exclusively_update_reactive_cache!)
|
2017-11-27 14:55:25 +00:00
|
|
|
|
2019-05-22 18:55:15 +00:00
|
|
|
described_class.new.perform("Environment", environment.id)
|
2017-11-27 14:55:25 +00:00
|
|
|
end
|
2016-12-17 04:09:50 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|