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
Jérome Perrin
gitlab-ce
Commits
7f0ecf3a
Commit
7f0ecf3a
authored
Dec 13, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing tests for build `cancelable?` method
parent
d7a77432
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
spec/models/build_spec.rb
spec/models/build_spec.rb
+36
-0
No files found.
spec/models/build_spec.rb
View file @
7f0ecf3a
...
@@ -899,6 +899,42 @@ describe Ci::Build, models: true do
...
@@ -899,6 +899,42 @@ describe Ci::Build, models: true do
end
end
end
end
describe
'#cancelable?'
do
subject
{
build
}
context
'when build is cancelable'
do
context
'when build is pending'
do
it
{
is_expected
.
to
be_cancelable
}
end
context
'when build is running'
do
before
do
build
.
run!
end
it
{
is_expected
.
to
be_cancelable
}
end
end
context
'when build is not cancelable'
do
context
'when build is successful'
do
before
do
build
.
success!
end
it
{
is_expected
.
not_to
be_cancelable
}
end
context
'when build is failed'
do
before
do
build
.
drop!
end
it
{
is_expected
.
not_to
be_cancelable
}
end
end
end
describe
'#retryable?'
do
describe
'#retryable?'
do
subject
{
build
}
subject
{
build
}
...
...
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