Commit 2f3dc314 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix spec failures

parent 4e60f79e
...@@ -10,5 +10,3 @@ ...@@ -10,5 +10,3 @@
- else - else
= render_status_with_link('build', subject.status) = render_status_with_link('build', subject.status)
= ci_icon_for_status(subject.status) = ci_icon_for_status(subject.status)
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- if grouped_statuses.one? - if grouped_statuses.one?
- status = grouped_statuses.first - status = grouped_statuses.first
- is_playable = status.playable? && can?(current_user, :update_build, @project) - 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 .curve
.build-content .build-content
= render "projects/#{status.to_partial_path}_pipeline", subject: status = render "projects/#{status.to_partial_path}_pipeline", subject: status
......
- group_status = CommitStatus.where(id: subject).status - group_status = CommitStatus.where(id: subject).status
= render_status_with_link('build', group_status) = render_status_with_link('build', group_status)
.dropdown.inline .dropdown.inline
%button.dropdown-menu-toggle{type: 'button', data: {toggle: 'dropdown'}} %button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
%span.ci-status-text %span.ci-status-text
= name = name
%span.badge= subject.length %span.badge= subject.size
%ul.dropdown-menu.grouped-pipeline-dropdown %ul.dropdown-menu.grouped-pipeline-dropdown
.arrow .arrow
- subject.each do |status| - subject.each do |status|
......
- if subject.target_url - if subject.target_url
- link_to subject.target_url do = link_to subject.target_url do
= render_status_with_link('commit status', subject.status) = render_status_with_link('commit status', subject.status)
%span.ci-status-text= subject.name %span.ci-status-text= subject.name
- else - else
......
...@@ -4,15 +4,14 @@ describe 'projects/pipelines/show' do ...@@ -4,15 +4,14 @@ describe 'projects/pipelines/show' do
include Devise::TestHelpers include Devise::TestHelpers
let(:project) { create(:project) } let(:project) { create(:project) }
let(:pipeline) do let(:pipeline) { create(:ci_empty_pipeline, project: project, sha: project.commit.id) }
create(:ci_empty_pipeline, project: project,
sha: project.commit.id)
end
before do before do
controller.prepend_view_path('app/views/projects')
create_build('build', 0, 'build') create_build('build', 0, 'build')
create_build('test', 1, 'rspec 0 2') create_build('test', 1, 'rspec 0:2')
create_build('test', 1, 'rspec 1 2') create_build('test', 1, 'rspec 1:2')
create_build('test', 1, 'audit') create_build('test', 1, 'audit')
create_build('deploy', 2, 'production') create_build('deploy', 2, 'production')
...@@ -38,7 +37,7 @@ describe 'projects/pipelines/show' do ...@@ -38,7 +37,7 @@ describe 'projects/pipelines/show' do
# builds # builds
expect(rendered).to have_text('rspec') 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('production')
expect(rendered).to have_text('jenkins') expect(rendered).to have_text('jenkins')
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