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
Boxiang Sun
gitlab-ce
Commits
84ab8a71
Commit
84ab8a71
authored
Aug 28, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reproduced bug
parent
7ccef75a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
spec/requests/api/triggers_spec.rb
spec/requests/api/triggers_spec.rb
+16
-0
No files found.
spec/requests/api/triggers_spec.rb
View file @
84ab8a71
...
@@ -86,6 +86,22 @@ describe API::Triggers do
...
@@ -86,6 +86,22 @@ describe API::Triggers do
end
end
end
end
context
'when legacy trigger'
do
before
do
trigger
.
update
(
owner:
nil
)
end
it
'creates pipeline'
do
post
api
(
"/projects/
#{
project
.
id
}
/trigger/pipeline"
),
options
.
merge
(
ref:
'master'
)
expect
(
response
).
to
have_http_status
(
201
)
expect
(
json_response
).
to
include
(
'id'
=>
pipeline
.
id
)
pipeline
.
builds
.
reload
expect
(
pipeline
.
builds
.
pending
.
size
).
to
eq
(
2
)
expect
(
pipeline
.
builds
.
size
).
to
eq
(
5
)
end
end
context
'when triggering a pipeline from a trigger token'
do
context
'when triggering a pipeline from a trigger token'
do
it
'does not leak the presence of project when token is for different project'
do
it
'does not leak the presence of project when token is for different project'
do
post
api
(
"/projects/
#{
project2
.
id
}
/ref/master/trigger/pipeline?token=
#{
trigger_token
}
"
),
{
ref:
'refs/heads/other-branch'
}
post
api
(
"/projects/
#{
project2
.
id
}
/ref/master/trigger/pipeline?token=
#{
trigger_token
}
"
),
{
ref:
'refs/heads/other-branch'
}
...
...
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