summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-09-14 16:57:36 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-09-14 17:33:07 +0200
commit2f3dc314f42dbd79813e6251792853bc231e69dd (patch)
treef4f5254fd092c34568a7d998abe69923349bc733
parent4e60f79e4027961ed3ec33fc16e2260c660d545a (diff)
downloadgitlab-ce-group-similar.tar.gz
Fix spec failuresgroup-similar
-rw-r--r--app/views/projects/ci/builds/_build_pipeline.html.haml2
-rw-r--r--app/views/projects/commit/_pipeline_stage.html.haml2
-rw-r--r--app/views/projects/commit/_pipeline_status_group.html.haml4
-rw-r--r--app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml2
-rw-r--r--spec/views/projects/pipelines/show.html.haml_spec.rb13
5 files changed, 10 insertions, 13 deletions
diff --git a/app/views/projects/ci/builds/_build_pipeline.html.haml b/app/views/projects/ci/builds/_build_pipeline.html.haml
index d19e193c432..547bc0c9c19 100644
--- a/app/views/projects/ci/builds/_build_pipeline.html.haml
+++ b/app/views/projects/ci/builds/_build_pipeline.html.haml
@@ -10,5 +10,3 @@
- else
= render_status_with_link('build', subject.status)
= ci_icon_for_status(subject.status)
-
-
diff --git a/app/views/projects/commit/_pipeline_stage.html.haml b/app/views/projects/commit/_pipeline_stage.html.haml
index 368564481c4..23c5c51fbc2 100644
--- a/app/views/projects/commit/_pipeline_stage.html.haml
+++ b/app/views/projects/commit/_pipeline_stage.html.haml
@@ -3,7 +3,7 @@
- if grouped_statuses.one?
- status = grouped_statuses.first
- is_playable = status.playable? && can?(current_user, :update_build, @project)
- %li.build{class: ("playable" if is_playable)}
+ %li.build{ class: ("playable" if is_playable) }
.curve
.build-content
= render "projects/#{status.to_partial_path}_pipeline", subject: status
diff --git a/app/views/projects/commit/_pipeline_status_group.html.haml b/app/views/projects/commit/_pipeline_status_group.html.haml
index 03b6249963b..4e7a6f1af08 100644
--- a/app/views/projects/commit/_pipeline_status_group.html.haml
+++ b/app/views/projects/commit/_pipeline_status_group.html.haml
@@ -1,10 +1,10 @@
- group_status = CommitStatus.where(id: subject).status
= render_status_with_link('build', group_status)
.dropdown.inline
- %button.dropdown-menu-toggle{type: 'button', data: {toggle: 'dropdown'}}
+ %button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
%span.ci-status-text
= name
- %span.badge= subject.length
+ %span.badge= subject.size
%ul.dropdown-menu.grouped-pipeline-dropdown
.arrow
- subject.each do |status|
diff --git a/app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml b/app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml
index 9b54c2bc3af..409f4701e4b 100644
--- a/app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml
+++ b/app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml
@@ -1,5 +1,5 @@
- if subject.target_url
- - link_to subject.target_url do
+ = link_to subject.target_url do
= render_status_with_link('commit status', subject.status)
%span.ci-status-text= subject.name
- else
diff --git a/spec/views/projects/pipelines/show.html.haml_spec.rb b/spec/views/projects/pipelines/show.html.haml_spec.rb
index 920d7528892..c5b16c1c304 100644
--- a/spec/views/projects/pipelines/show.html.haml_spec.rb
+++ b/spec/views/projects/pipelines/show.html.haml_spec.rb
@@ -4,15 +4,14 @@ describe 'projects/pipelines/show' do
include Devise::TestHelpers
let(:project) { create(:project) }
- let(:pipeline) do
- create(:ci_empty_pipeline, project: project,
- sha: project.commit.id)
- end
+ let(:pipeline) { create(:ci_empty_pipeline, project: project, sha: project.commit.id) }
before do
+ controller.prepend_view_path('app/views/projects')
+
create_build('build', 0, 'build')
- create_build('test', 1, 'rspec 0 2')
- create_build('test', 1, 'rspec 1 2')
+ create_build('test', 1, 'rspec 0:2')
+ create_build('test', 1, 'rspec 1:2')
create_build('test', 1, 'audit')
create_build('deploy', 2, 'production')
@@ -38,7 +37,7 @@ describe 'projects/pipelines/show' do
# builds
expect(rendered).to have_text('rspec')
- expect(rendered).to have_text('rspec 0:1')
+ expect(rendered).to have_text('rspec 0:2')
expect(rendered).to have_text('production')
expect(rendered).to have_text('jenkins')
end