Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
spec/requests/api/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