Commit d92054dd authored by Kamil Trzcinski's avatar Kamil Trzcinski

Use `humanize`

parent f12faae8
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
%li %li
= link_to play_namespace_project_build_path(@project.namespace, @project, build), method: :post, rel: 'nofollow' do = link_to play_namespace_project_build_path(@project.namespace, @project, build), method: :post, rel: 'nofollow' do
= icon("play") = icon("play")
%span= build.name.capitalize %span= build.name.humanize
- if artifacts.present? - if artifacts.present?
.btn-group .btn-group
%a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'} %a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'}
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
%li %li
= link_to [:play, @project.namespace.becomes(Namespace), @project, action], method: :post, rel: 'nofollow' do = link_to [:play, @project.namespace.becomes(Namespace), @project, action], method: :post, rel: 'nofollow' do
= icon("play") = icon("play")
%span= action.name.capitalize %span= action.name.humanize
- if defined?(allow_rollback) && allow_rollback - if defined?(allow_rollback) && allow_rollback
= link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do = link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do
......
...@@ -52,12 +52,12 @@ feature 'Environments', feature: true do ...@@ -52,12 +52,12 @@ feature 'Environments', feature: true do
given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production') } given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production') }
scenario 'does show a play button' do scenario 'does show a play button' do
expect(page).to have_link(manual.name.capitalize) expect(page).to have_link(manual.name.humanize)
end end
scenario 'does allow to play manual action' do scenario 'does allow to play manual action' do
expect(manual).to be_skipped 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(page).to have_content(manual.name)
expect(manual.reload).to be_pending expect(manual.reload).to be_pending
end end
...@@ -113,12 +113,12 @@ feature 'Environments', feature: true do ...@@ -113,12 +113,12 @@ feature 'Environments', feature: true do
given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production') } given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production') }
scenario 'does show a play button' do scenario 'does show a play button' do
expect(page).to have_link(manual.name.capitalize) expect(page).to have_link(manual.name.humanize)
end end
scenario 'does allow to play manual action' do scenario 'does allow to play manual action' do
expect(manual).to be_skipped 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(page).to have_content(manual.name)
expect(manual.reload).to be_pending expect(manual.reload).to be_pending
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment