From 4840c682414aa2e7d57fa6f792405a49709b7dd8 Mon Sep 17 00:00:00 2001
From: Filipa Lacerda <filipa@gitlab.com>
Date: Tue, 31 Jan 2017 10:40:24 +0000
Subject: [PATCH] Don't capitalize environment name in show page

Upate test to match the new behavior
---
 app/views/projects/environments/show.html.haml        | 2 +-
 changelogs/unreleased/27484-environment-show-name.yml | 4 ++++
 spec/features/environment_spec.rb                     | 4 ++++
 spec/features/environments_spec.rb                    | 2 +-
 4 files changed, 10 insertions(+), 2 deletions(-)
 create mode 100644 changelogs/unreleased/27484-environment-show-name.yml

diff --git a/app/views/projects/environments/show.html.haml b/app/views/projects/environments/show.html.haml
index 6e0d9456900..b23ca109746 100644
--- a/app/views/projects/environments/show.html.haml
+++ b/app/views/projects/environments/show.html.haml
@@ -5,7 +5,7 @@
 %div{ class: container_class }
   .top-area.adjust
     .col-md-9
-      %h3.page-title= @environment.name.capitalize
+      %h3.page-title= @environment.name
     .col-md-3
       .nav-controls
         = render 'projects/environments/terminal_button', environment: @environment
diff --git a/changelogs/unreleased/27484-environment-show-name.yml b/changelogs/unreleased/27484-environment-show-name.yml
new file mode 100644
index 00000000000..dc400d65006
--- /dev/null
+++ b/changelogs/unreleased/27484-environment-show-name.yml
@@ -0,0 +1,4 @@
+---
+title: Don't capitalize environment name in show page
+merge_request:
+author:
diff --git a/spec/features/environment_spec.rb b/spec/features/environment_spec.rb
index 56f6cd2e095..511c95b758f 100644
--- a/spec/features/environment_spec.rb
+++ b/spec/features/environment_spec.rb
@@ -19,6 +19,10 @@ feature 'Environment', :feature do
       visit_environment(environment)
     end
 
+    scenario 'shows environment name' do
+      expect(page).to have_content(environment.name)
+    end
+
     context 'without deployments' do
       scenario 'does show no deployments' do
         expect(page).to have_content('You don\'t have any deployments right now.')
diff --git a/spec/features/environments_spec.rb b/spec/features/environments_spec.rb
index 72b984cfab8..c033b693213 100644
--- a/spec/features/environments_spec.rb
+++ b/spec/features/environments_spec.rb
@@ -194,7 +194,7 @@ feature 'Environments page', :feature, :js do
         end
 
         scenario 'does create a new pipeline' do
-          expect(page).to have_content('Production')
+          expect(page).to have_content('production')
         end
       end
 
-- 
GitLab