require'spec_helper'describeClusterProvisionWorkerdodescribe'#perform'docontext'when cluster exists'dolet(:cluster){create(:gcp_cluster)}it'provision a cluster'doexpect_any_instance_of(Ci::ProvisionClusterService).toreceive(:execute)described_class.new.perform(cluster.id)endendcontext'when cluster does not exist'doit'does not provision a cluster'doexpect_any_instance_of(Ci::ProvisionClusterService).not_toreceive(:execute)described_class.new.perform(123)endendendend