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
Boxiang Sun
gitlab-ce
Commits
1ca4f282
Commit
1ca4f282
authored
Sep 28, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for methods that count pipeline seeds size
parent
6ba96149
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
spec/lib/gitlab/ci/stage/seed_spec.rb
spec/lib/gitlab/ci/stage/seed_spec.rb
+6
-0
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+9
-1
No files found.
spec/lib/gitlab/ci/stage/seed_spec.rb
View file @
1ca4f282
...
...
@@ -11,6 +11,12 @@ describe Gitlab::Ci::Stage::Seed do
described_class
.
new
(
pipeline
,
'test'
,
builds
)
end
describe
'#size'
do
it
'returns a number of jobs in the stage'
do
expect
(
subject
.
size
).
to
eq
2
end
end
describe
'#stage'
do
it
'returns hash attributes of a stage'
do
expect
(
subject
.
stage
).
to
be_a
Hash
...
...
spec/models/ci/pipeline_spec.rb
View file @
1ca4f282
...
...
@@ -238,7 +238,7 @@ describe Ci::Pipeline, :mailer do
describe
'#stage_seeds'
do
let
(
:pipeline
)
do
create
(
:ci_pipeline
,
config:
{
rspec:
{
script:
'rake'
}
})
build
(
:ci_pipeline
,
config:
{
rspec:
{
script:
'rake'
}
})
end
it
'returns preseeded stage seeds object'
do
...
...
@@ -247,6 +247,14 @@ describe Ci::Pipeline, :mailer do
end
end
describe
'#seeds_size'
do
let
(
:pipeline
)
{
build
(
:ci_pipeline_with_one_job
)
}
it
'returns number of jobs in stage seeds'
do
expect
(
pipeline
.
seeds_size
).
to
eq
1
end
end
describe
'#legacy_stages'
do
subject
{
pipeline
.
legacy_stages
}
...
...
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