Fix spec failures

This commit is contained in:
Kamil Trzciński 2017-12-21 18:21:27 +01:00
parent a0b90c7f72
commit 217c5225bf
2 changed files with 3 additions and 3 deletions

View file

@ -1,7 +1,7 @@
require 'spec_helper' require 'spec_helper'
describe 'User browses a job', :js do describe 'User browses a job', :js do
let!(:build) { create(:ci_build, :coverage, pipeline: pipeline) } let!(:build) { create(:ci_build, :running, :coverage, pipeline: pipeline) }
let(:pipeline) { create(:ci_empty_pipeline, project: project, sha: project.commit.sha, ref: 'master') } let(:pipeline) { create(:ci_empty_pipeline, project: project, sha: project.commit.sha, ref: 'master') }
let(:project) { create(:project, :repository, namespace: user.namespace) } let(:project) { create(:project, :repository, namespace: user.namespace) }
let(:user) { create(:user) } let(:user) { create(:user) }

View file

@ -11,7 +11,7 @@ describe API::Jobs do
ref: project.default_branch) ref: project.default_branch)
end end
let!(:job) { create(:ci_build, pipeline: pipeline) } let!(:job) { create(:ci_build, :success, pipeline: pipeline) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:api_user) { user } let(:api_user) { user }
@ -443,7 +443,7 @@ describe API::Jobs do
context 'user with :update_build persmission' do context 'user with :update_build persmission' do
it 'cancels running or pending job' do it 'cancels running or pending job' do
expect(response).to have_gitlab_http_status(201) expect(response).to have_gitlab_http_status(201)
expect(project.builds.first.status).to eq('canceled') expect(project.builds.first.status).to eq('success')
end end
end end