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
Léo-Paul Géneau
gitlab-ce
Commits
6d8a490f
Commit
6d8a490f
authored
Jan 23, 2019
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some specs for processable CI/CD entities relation
parent
3508948d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+23
-0
No files found.
spec/models/ci/pipeline_spec.rb
View file @
6d8a490f
...
...
@@ -39,6 +39,29 @@ describe Ci::Pipeline, :mailer do
end
end
describe
'.processables'
do
before
do
create
(
:ci_build
,
name:
'build'
,
pipeline:
pipeline
)
create
(
:ci_bridge
,
name:
'bridge'
,
pipeline:
pipeline
)
create
(
:commit_status
,
name:
'commit status'
,
pipeline:
pipeline
)
create
(
:generic_commit_status
,
name:
'generic status'
,
pipeline:
pipeline
)
end
it
'has an association with processable CI/CD entities'
do
pipeline
.
processables
.
pluck
(
'name'
).
yield_self
do
|
processables
|
expect
(
processables
).
to
match_array
%w[build bridge]
end
end
it
'makes it possible to append a new processable'
do
pipeline
.
processables
<<
build
(
:ci_bridge
)
pipeline
.
save!
expect
(
pipeline
.
processables
.
reload
.
count
).
to
eq
3
end
end
describe
'.sort_by_merge_request_pipelines'
do
subject
{
described_class
.
sort_by_merge_request_pipelines
}
...
...
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