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
7efef550
Commit
7efef550
authored
Sep 05, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add unit test for `extends` in .gitlab-ci.yml
parent
b19d2e1e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
spec/lib/gitlab/ci/config/entry/job_spec.rb
spec/lib/gitlab/ci/config/entry/job_spec.rb
+13
-1
No files found.
spec/lib/gitlab/ci/config/entry/job_spec.rb
View file @
7efef550
require
'spec_helper'
require
'fast_spec_helper'
require_dependency
'active_model'
describe
Gitlab
::
Ci
::
Config
::
Entry
::
Job
do
let
(
:entry
)
{
described_class
.
new
(
config
,
name: :rspec
)
}
...
...
@@ -81,6 +82,15 @@ describe Gitlab::Ci::Config::Entry::Job do
end
end
context
'when extends key is not a string'
do
let
(
:config
)
{
{
extends:
123
}
}
it
'returns error about wrong value type'
do
expect
(
entry
).
not_to
be_valid
expect
(
entry
.
errors
).
to
include
"job extends should be a string"
end
end
context
'when retry value is not correct'
do
context
'when it is not a numeric value'
do
let
(
:config
)
{
{
retry:
true
}
}
...
...
@@ -124,6 +134,8 @@ describe Gitlab::Ci::Config::Entry::Job do
describe
'#relevant?'
do
it
'is a relevant entry'
do
entry
=
described_class
.
new
({
script:
'rspec'
},
name: :rspec
)
expect
(
entry
).
to
be_relevant
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