diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-02-20 12:42:05 +1100 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-02-20 12:47:07 +1100 |
commit | ba4114d25f538d198df2f681b9cb08567494207e (patch) | |
tree | 876cf5b44ab81b25cdf30acb9ebd642778800615 /spec/models/clusters/applications/ingress_spec.rb | |
parent | f0b27f9b406579a03e55fa16cbc7095009dc8c2b (diff) | |
download | gitlab-ce-ba4114d25f538d198df2f681b9cb08567494207e.tar.gz |
Refactor ingress IP address waiting code (#42643)
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) |