Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/environment_spec.rb')
-rw-r--r--spec/models/environment_spec.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb
index 7b7b92a0b8d..066763645ab 100644
--- a/spec/models/environment_spec.rb
+++ b/spec/models/environment_spec.rb
@@ -15,6 +15,7 @@ RSpec.describe Environment, :use_clean_rails_memory_store_caching, feature_categ
it { is_expected.to be_kind_of(ReactiveCaching) }
it { is_expected.to nullify_if_blank(:external_url) }
+ it { is_expected.to nullify_if_blank(:kubernetes_namespace) }
it { is_expected.to belong_to(:project).required }
it { is_expected.to belong_to(:merge_request).optional }
@@ -36,6 +37,7 @@ RSpec.describe Environment, :use_clean_rails_memory_store_caching, feature_categ
it { is_expected.to validate_length_of(:slug).is_at_most(24) }
it { is_expected.to validate_length_of(:external_url).is_at_most(255) }
+ it { is_expected.to validate_length_of(:kubernetes_namespace).is_at_most(63) }
describe 'validation' do
it 'does not become invalid record when external_url is empty' do
@@ -80,15 +82,6 @@ RSpec.describe Environment, :use_clean_rails_memory_store_caching, feature_categ
expect(env).to validate_presence_of(:tier).on(:update)
end
end
-
- context 'when FF is disabled' do
- before do
- stub_feature_flags(validate_environment_tier_presence: false)
- end
-
- it { expect(env).to validate_presence_of(:tier).on(:create) }
- it { expect(env).not_to validate_presence_of(:tier).on(:update) }
- end
end
end