gitlab-org--gitlab-foss/spec/views/projects/jobs/show.html.haml_spec.rb

39 lines
914 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'projects/jobs/show' do
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
let(:build) { create(:ci_build, pipeline: pipeline) }
let(:builds) { project.builds.present(current_user: user) }
let(:pipeline) do
create(:ci_pipeline, project: project, sha: project.commit.id)
end
before do
2017-04-06 02:45:01 -04:00
assign(:build, build.present)
assign(:project, project)
assign(:builds, builds)
allow(view).to receive(:can?).and_return(true)
end
context 'when job is running' do
2018-04-03 13:47:04 -04:00
let(:build) { create(:ci_build, :trace_live, :running, pipeline: pipeline) }
before do
render
end
it 'does not show retry button' do
expect(rendered).not_to have_link('Retry')
end
2017-02-22 18:42:14 -05:00
it 'does not show New issue button' do
expect(rendered).not_to have_link('New issue')
end
end
end