diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-27 18:09:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-27 18:09:24 +0300 |
commit | f8d15ca65390475e356b06dedc51e10ccd179f86 (patch) | |
tree | ef916d4e8e11c9e00d809e5cdcf63814e86d6e89 /spec/serializers/cluster_application_entity_spec.rb | |
parent | 3ab4feda4dce9c9f0672375ae27c2f7c2ba6f4ad (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/serializers/cluster_application_entity_spec.rb')
-rw-r--r-- | spec/serializers/cluster_application_entity_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/serializers/cluster_application_entity_spec.rb b/spec/serializers/cluster_application_entity_spec.rb index c700c150461..873fbf812cc 100644 --- a/spec/serializers/cluster_application_entity_spec.rb +++ b/spec/serializers/cluster_application_entity_spec.rb @@ -59,5 +59,23 @@ describe ClusterApplicationEntity do expect(subject[:external_ip]).to eq('111.222.111.222') end end + + context 'for knative application' do + let(:pages_domain) { create(:pages_domain, :instance_serverless) } + let(:application) { build(:clusters_applications_knative, :installed) } + + before do + create(:serverless_domain_cluster, knative: application, pages_domain: pages_domain) + end + + it 'includes available domains' do + expect(subject[:available_domains].length).to eq(1) + expect(subject[:available_domains].first).to eq(id: pages_domain.id, domain: pages_domain.domain) + end + + it 'includes pages_domain' do + expect(subject[:pages_domain]).to eq(id: pages_domain.id, domain: pages_domain.domain) + end + end end end |