debian-mirror-gitlab/spec/workers/reactive_caching_worker_spec.rb

20 lines
607 B
Ruby
Raw Normal View History

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
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 }
2019-09-30 21:07:59 +05:30
let!(:environment) { create(:environment, project: project) }
2018-03-17 18:26:18 +05:30
it 'calls #exclusively_update_reactive_cache!' do
2019-09-30 21:07:59 +05:30
expect_any_instance_of(Environment).to receive(:exclusively_update_reactive_cache!)
2018-03-17 18:26:18 +05:30
2019-09-30 21:07:59 +05:30
described_class.new.perform("Environment", environment.id)
2018-03-17 18:26:18 +05:30
end
2017-08-17 22:00:37 +05:30
end
end
end