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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
f127183f
Commit
f127183f
authored
Jul 05, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test example for external commit status retries
parent
0f30bcf1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
spec/requests/api/commit_statuses_spec.rb
spec/requests/api/commit_statuses_spec.rb
+22
-0
No files found.
spec/requests/api/commit_statuses_spec.rb
View file @
f127183f
...
@@ -237,6 +237,28 @@ describe API::CommitStatuses do
...
@@ -237,6 +237,28 @@ describe API::CommitStatuses do
end
end
end
end
context
'when retrying a commit status'
do
before
do
post
api
(
post_url
,
developer
),
{
state:
'failed'
,
name:
'test'
,
ref:
'master'
}
post
api
(
post_url
,
developer
),
{
state:
'success'
,
name:
'test'
,
ref:
'master'
}
end
it
'correctly posts a new commit status'
do
expect
(
response
).
to
have_http_status
(
201
)
expect
(
json_response
[
'sha'
]).
to
eq
(
commit
.
id
)
expect
(
json_response
[
'status'
]).
to
eq
(
'success'
)
end
it
'retries a commit status'
do
expect
(
CommitStatus
.
count
).
to
eq
2
expect
(
CommitStatus
.
first
).
to
be_retried
expect
(
CommitStatus
.
last
.
pipeline
).
to
be_success
end
end
context
'when status is invalid'
do
context
'when status is invalid'
do
before
do
before
do
post
api
(
post_url
,
developer
),
state:
'invalid'
post
api
(
post_url
,
developer
),
state:
'invalid'
...
...
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