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
6208c24d
Commit
6208c24d
authored
Jul 19, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move when tests before to make it no conflict with manual-actions
parent
41fa516b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
9 deletions
+27
-9
spec/models/build_spec.rb
spec/models/build_spec.rb
+27
-9
No files found.
spec/models/build_spec.rb
View file @
6208c24d
...
@@ -792,10 +792,10 @@ describe Ci::Build, models: true do
...
@@ -792,10 +792,10 @@ describe Ci::Build, models: true do
context
'if config does not have a questioned job'
do
context
'if config does not have a questioned job'
do
let
(
:config
)
do
let
(
:config
)
do
YAML
.
dump
({
YAML
.
dump
({
test_other:
{
test_other:
{
script:
'Hello World'
script:
'Hello World'
}
}
})
})
end
end
it
{
is_expected
.
to
eq
(
'on_success'
)
}
it
{
is_expected
.
to
eq
(
'on_success'
)
}
...
@@ -804,11 +804,11 @@ describe Ci::Build, models: true do
...
@@ -804,11 +804,11 @@ describe Ci::Build, models: true do
context
'if config has when'
do
context
'if config has when'
do
let
(
:config
)
do
let
(
:config
)
do
YAML
.
dump
({
YAML
.
dump
({
test:
{
test:
{
script:
'Hello World'
,
script:
'Hello World'
,
when:
'always'
when:
'always'
}
}
})
})
end
end
it
{
is_expected
.
to
eq
(
'always'
)
}
it
{
is_expected
.
to
eq
(
'always'
)
}
...
@@ -816,4 +816,22 @@ describe Ci::Build, models: true do
...
@@ -816,4 +816,22 @@ describe Ci::Build, models: true do
end
end
end
end
end
end
describe
'#retryable?'
do
context
'when build is running'
do
before
{
build
.
run!
}
it
'should return false'
do
expect
(
build
.
retryable?
).
to
be
false
end
end
context
'when build is finished'
do
before
{
build
.
success!
}
it
'should return true'
do
expect
(
build
.
retryable?
).
to
be
true
end
end
end
end
end
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