summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-07-18 18:42:57 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-07-18 18:42:57 +0200
commitd92054dd660fba766282ad382ca6f541b5e1bad6 (patch)
treecdff5f29ddeced2acc6edb025c29f5b4335e7547
parentf12faae8b841189fb3f8693fc4880fdb9688b5d2 (diff)
downloadgitlab-ce-d92054dd660fba766282ad382ca6f541b5e1bad6.tar.gz
Use `humanize`
-rw-r--r--app/views/projects/ci/pipelines/_pipeline.html.haml2
-rw-r--r--app/views/projects/deployments/_actions.haml2
-rw-r--r--spec/features/environments_spec.rb8
3 files changed, 6 insertions, 6 deletions
diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml
index 797e52d1122..f26d93e265b 100644
--- a/app/views/projects/ci/pipelines/_pipeline.html.haml
+++ b/app/views/projects/ci/pipelines/_pipeline.html.haml
@@ -70,7 +70,7 @@
%li
= link_to play_namespace_project_build_path(@project.namespace, @project, build), method: :post, rel: 'nofollow' do
= icon("play")
- %span= build.name.capitalize
+ %span= build.name.humanize
- if artifacts.present?
.btn-group
%a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'}
diff --git a/app/views/projects/deployments/_actions.haml b/app/views/projects/deployments/_actions.haml
index 8dd9e70ac67..213d74972f1 100644
--- a/app/views/projects/deployments/_actions.haml
+++ b/app/views/projects/deployments/_actions.haml
@@ -12,7 +12,7 @@
%li
= link_to [:play, @project.namespace.becomes(Namespace), @project, action], method: :post, rel: 'nofollow' do
= icon("play")
- %span= action.name.capitalize
+ %span= action.name.humanize
- if defined?(allow_rollback) && allow_rollback
= link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do
diff --git a/spec/features/environments_spec.rb b/spec/features/environments_spec.rb
index d62b3772fdb..9c018be14b7 100644
--- a/spec/features/environments_spec.rb
+++ b/spec/features/environments_spec.rb
@@ -52,12 +52,12 @@ feature 'Environments', feature: true do
given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production') }
scenario 'does show a play button' do
- expect(page).to have_link(manual.name.capitalize)
+ expect(page).to have_link(manual.name.humanize)
end
scenario 'does allow to play manual action' do
expect(manual).to be_skipped
- expect{ click_link(manual.name.capitalize) }.to change{ Ci::Pipeline.count }.by(0)
+ expect{ click_link(manual.name.humanize) }.not_to change { Ci::Pipeline.count }
expect(page).to have_content(manual.name)
expect(manual.reload).to be_pending
end
@@ -113,12 +113,12 @@ feature 'Environments', feature: true do
given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production') }
scenario 'does show a play button' do
- expect(page).to have_link(manual.name.capitalize)
+ expect(page).to have_link(manual.name.humanize)
end
scenario 'does allow to play manual action' do
expect(manual).to be_skipped
- expect{ click_link(manual.name.capitalize) }.to change{ Ci::Pipeline.count }.by(0)
+ expect{ click_link(manual.name.humanize) }.not_to change { Ci::Pipeline.count }
expect(page).to have_content(manual.name)
expect(manual.reload).to be_pending
end