diff options
Diffstat (limited to 'spec/models/clusters/applications/ingress_spec.rb')
-rw-r--r-- | spec/models/clusters/applications/ingress_spec.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/spec/models/clusters/applications/ingress_spec.rb b/spec/models/clusters/applications/ingress_spec.rb index da9535f9d16..c8109bf3cf6 100644 --- a/spec/models/clusters/applications/ingress_spec.rb +++ b/spec/models/clusters/applications/ingress_spec.rb @@ -4,16 +4,19 @@ describe Clusters::Applications::Ingress do it { is_expected.to belong_to(:cluster) } it { is_expected.to validate_presence_of(:cluster) } - include_examples 'cluster application specs', described_class + before do + allow(ClusterWaitForIngressIpAddressWorker).to receive(:perform_in) + end - describe '#post_install' do - let(:application) { create(:clusters_applications_ingress, :installed) } + include_examples 'cluster application specs', described_class + describe '#make_installed!' do before do - allow(ClusterWaitForIngressIpAddressWorker).to receive(:perform_in) - application.post_install + application.make_installed! end + let(:application) { create(:clusters_applications_ingress, :installing) } + it 'schedules a ClusterWaitForIngressIpAddressWorker' do expect(ClusterWaitForIngressIpAddressWorker).to have_received(:perform_in) .with(ClusterWaitForIngressIpAddressWorker::INTERVAL, 'ingress', application.id, 3) |