summaryrefslogtreecommitdiff
path: root/spec/models/environment_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
commit48aff82709769b098321c738f3444b9bdaa694c6 (patch)
treee00c7c43e2d9b603a5a6af576b1685e400410dee /spec/models/environment_spec.rb
parent879f5329ee916a948223f8f43d77fba4da6cd028 (diff)
downloadgitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'spec/models/environment_spec.rb')
-rw-r--r--spec/models/environment_spec.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb
index 433ede97b82..06d3e9da286 100644
--- a/spec/models/environment_spec.rb
+++ b/spec/models/environment_spec.rb
@@ -312,18 +312,25 @@ RSpec.describe Environment, :use_clean_rails_memory_store_caching do
describe '#update_merge_request_metrics?' do
{
+ 'gprd' => false,
+ 'prod' => true,
+ 'prod-test' => false,
+ 'PROD' => true,
'production' => true,
+ 'production-test' => false,
+ 'PRODUCTION' => true,
'production/eu' => true,
+ 'PRODUCTION/EU' => true,
'production/www.gitlab.com' => true,
'productioneu' => false,
- 'Production' => false,
- 'Production/eu' => false,
+ 'Production' => true,
+ 'Production/eu' => true,
'test-production' => false
}.each do |name, expected_value|
it "returns #{expected_value} for #{name}" do
env = create(:environment, name: name)
- expect(env.update_merge_request_metrics?).to eq(expected_value)
+ expect(env.update_merge_request_metrics?).to eq(expected_value), "Expected the name '#{name}' to result in #{expected_value}, but it didn't."
end
end
end