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
54f490a4
Commit
54f490a4
authored
Oct 10, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add initial specs for pipeline build chain class
parent
20fc42e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
spec/lib/gitlab/ci/pipeline/chain/build_spec.rb
spec/lib/gitlab/ci/pipeline/chain/build_spec.rb
+43
-0
No files found.
spec/lib/gitlab/ci/pipeline/chain/build_spec.rb
0 → 100644
View file @
54f490a4
require
'spec_helper'
describe
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Build
do
set
(
:project
)
{
create
(
:project
,
:repository
)
}
set
(
:user
)
{
create
(
:user
)
}
let
(
:pipeline
)
{
Ci
::
Pipeline
.
new
}
let
(
:command
)
do
double
(
'command'
,
source: :push
,
origin_ref:
'master'
,
checkout_sha:
project
.
commit
.
id
,
after_sha:
nil
,
before_sha:
nil
,
trigger_request:
nil
,
schedule:
nil
,
project:
project
,
current_user:
user
)
end
let
(
:step
)
{
described_class
.
new
(
pipeline
,
command
)
}
before
do
stub_ci_pipeline_to_return_yaml_file
step
.
perform!
end
it
'never breaks the chain'
do
expect
(
step
.
break?
).
to
be
false
end
it
'fills pipeline object with data'
do
expect
(
pipeline
.
sha
).
not_to
be_empty
end
it
'sets a valid config source'
do
expect
(
pipeline
.
repository_source?
).
to
be
true
end
it
'returns a valid pipeline'
do
expect
(
pipeline
).
to
be_valid
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