BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
782b384f
Commit
782b384f
authored
Jul 20, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename user2 to reporter_user
parent
ff3776c8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
builds_spec.rb
spec/requests/api/builds_spec.rb
+5
-5
No files found.
spec/requests/api/builds_spec.rb
View file @
782b384f
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment