Rename user2 to reporter_user
This commit is contained in:
parent
ff3776c8d5
commit
782b384f8a
1 changed files with 5 additions and 5 deletions
|
@ -5,11 +5,11 @@ describe API::API, api: true do
|
|||
|
||||
let(:user) { create(:user) }
|
||||
let(:api_user) { user }
|
||||
let(:user2) { create(:user) }
|
||||
let(:reporter_user) { create(:user) }
|
||||
let(:guest_user) { create(:user) }
|
||||
let!(:project) { create(:project, creator_id: user.id) }
|
||||
let!(:developer) { create(:project_member, :developer, user: user, project: project) }
|
||||
let!(:reporter) { create(:project_member, :reporter, user: user2, project: project) }
|
||||
let!(:reporter) { create(:project_member, :reporter, user: reporter_user, project: project) }
|
||||
let!(:guest) { create(:project_member, :guest, user: guest_user, project: project) }
|
||||
let!(:pipeline) { create(:ci_pipeline, project: project, sha: project.commit.id, ref: project.default_branch) }
|
||||
let!(:build) { create(:ci_build, pipeline: pipeline) }
|
||||
|
@ -175,7 +175,7 @@ describe API::API, api: true do
|
|||
end
|
||||
|
||||
describe 'GET /projects/:id/artifacts/:ref_name/download?job=name' do
|
||||
let(:api_user) { user2 } # is a reporter of the project
|
||||
let(:api_user) { reporter_user }
|
||||
let(:build) { create(:ci_build, :success, :artifacts, pipeline: pipeline) }
|
||||
|
||||
def path_for_ref(ref = pipeline.ref, job = build.name)
|
||||
|
@ -301,7 +301,7 @@ describe API::API, api: true do
|
|||
end
|
||||
|
||||
context 'user without :update_build permission' do
|
||||
let(:api_user) { user2 }
|
||||
let(:api_user) { reporter_user }
|
||||
|
||||
it 'should not cancel build' do
|
||||
expect(response).to have_http_status(403)
|
||||
|
@ -333,7 +333,7 @@ describe API::API, api: true do
|
|||
end
|
||||
|
||||
context 'user without :update_build permission' do
|
||||
let(:api_user) { user2 }
|
||||
let(:api_user) { reporter_user }
|
||||
|
||||
it 'should not retry build' do
|
||||
expect(response).to have_http_status(403)
|
||||
|
|
Loading…
Reference in a new issue