Use capitalize instead of titleize for manual actions

This commit is contained in:
Kamil Trzcinski 2016-07-18 14:56:22 +02:00
parent 640924e4a2
commit 20438213d5
5 changed files with 9 additions and 9 deletions

View file

@ -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.titleize
%span= build.name.capitalize
- if artifacts.present?
.btn-group
%a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'}

View file

@ -12,7 +12,7 @@
%li
= link_to [:play, @project.namespace.becomes(Namespace), @project, action], method: :post, rel: 'nofollow' do
= icon("play")
%span= action.name.titleize
%span= action.name.capitalize
- if defined?(allow_rollback) && allow_rollback
= link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do

View file

@ -5,7 +5,7 @@
%div{ class: container_class }
.top-area
.col-md-9
%h3.page-title= @environment.name.titleize
%h3.page-title= @environment.name.capitalize
.col-md-3
.nav-controls

View file

@ -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.titleize)
expect(page).to have_link(manual.name.capitalize)
end
scenario 'does allow to play manual action' do
expect(manual).to be_skipped
expect{ click_link(manual.name.titleize) }.to change{ Ci::Pipeline.count }.by(0)
expect{ click_link(manual.name.capitalize) }.to change{ Ci::Pipeline.count }.by(0)
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.titleize)
expect(page).to have_link(manual.name.capitalize)
end
scenario 'does allow to play manual action' do
expect(manual).to be_skipped
expect{ click_link(manual.name.titleize) }.to change{ Ci::Pipeline.count }.by(0)
expect{ click_link(manual.name.capitalize) }.to change{ Ci::Pipeline.count }.by(0)
expect(page).to have_content(manual.name)
expect(manual.reload).to be_pending
end

View file

@ -67,10 +67,10 @@ describe "Pipelines" do
before { visit namespace_project_pipelines_path(project.namespace, project) }
it { expect(page).to have_link('Manual Build') }
it { expect(page).to have_link('Manual build') }
context 'when playing' do
before { click_link('Manual Build') }
before { click_link('Manual build') }
it { expect(manual.reload).to be_pending }
end