diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-14 18:07:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-14 18:07:56 +0300 |
commit | 016af097cb1fa872fdc28a786d16315e55cd2701 (patch) | |
tree | 76f97f90a8048685efb3eb0c543b3a75d99be6ee /spec/models/serverless | |
parent | 00b8ecb72c9f77d864aff3572f028613f45af03c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/serverless')
-rw-r--r-- | spec/models/serverless/domain_cluster_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/models/serverless/domain_cluster_spec.rb b/spec/models/serverless/domain_cluster_spec.rb new file mode 100644 index 00000000000..73d7d64d35e --- /dev/null +++ b/spec/models/serverless/domain_cluster_spec.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe Serverless::DomainCluster do + subject { create(:serverless_domain_cluster) } + + describe 'validations' do + it { is_expected.to validate_presence_of(:pages_domain) } + it { is_expected.to validate_presence_of(:knative) } + it { is_expected.to validate_presence_of(:uuid) } + + it { is_expected.to validate_uniqueness_of(:uuid) } + it { is_expected.to validate_length_of(:uuid).is_equal_to(14) } + end + + describe 'associations' do + it { is_expected.to belong_to(:pages_domain) } + it { is_expected.to belong_to(:knative) } + it { is_expected.to belong_to(:creator).optional } + end +end |