gitlab-org--gitlab-foss/spec/models/clusters/applications/ingress_spec.rb

26 lines
745 B
Ruby
Raw Normal View History

2017-11-07 09:10:40 -05:00
require 'rails_helper'
describe Clusters::Applications::Ingress do
it { is_expected.to belong_to(:cluster) }
it { is_expected.to validate_presence_of(:cluster) }
before do
allow(ClusterWaitForIngressIpAddressWorker).to receive(:perform_in)
end
include_examples 'cluster application specs', described_class
describe '#make_installed!' do
before do
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)
end
end
2017-11-07 09:10:40 -05:00
end