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
6c5c698f
Commit
6c5c698f
authored
Feb 24, 2021
by
Allison Browne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Spec improvements based on review
parent
00bfd00b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+11
-8
No files found.
spec/models/ci/pipeline_spec.rb
View file @
6c5c698f
...
...
@@ -144,7 +144,8 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep do
subject
{
described_class
.
for_sha
(
sha
)
}
let
(
:sha
)
{
'abc'
}
let!
(
:pipeline
)
{
create
(
:ci_pipeline
,
sha:
'abc'
)
}
let_it_be
(
:pipeline
)
{
create
(
:ci_pipeline
,
sha:
'abc'
)
}
it
'returns the pipeline'
do
is_expected
.
to
contain_exactly
(
pipeline
)
...
...
@@ -172,7 +173,8 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep do
subject
{
described_class
.
for_source_sha
(
source_sha
)
}
let
(
:source_sha
)
{
'abc'
}
let!
(
:pipeline
)
{
create
(
:ci_pipeline
,
source_sha:
'abc'
)
}
let_it_be
(
:pipeline
)
{
create
(
:ci_pipeline
,
source_sha:
'abc'
)
}
it
'returns the pipeline'
do
is_expected
.
to
contain_exactly
(
pipeline
)
...
...
@@ -230,7 +232,8 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep do
subject
{
described_class
.
for_branch
(
branch
)
}
let
(
:branch
)
{
'master'
}
let!
(
:pipeline
)
{
create
(
:ci_pipeline
,
ref:
'master'
)
}
let_it_be
(
:pipeline
)
{
create
(
:ci_pipeline
,
ref:
'master'
)
}
it
'returns the pipeline'
do
is_expected
.
to
contain_exactly
(
pipeline
)
...
...
@@ -249,11 +252,11 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep do
describe
'.ci_sources'
do
subject
{
described_class
.
ci_sources
}
let
!
(
:push_pipeline
)
{
build
(
:ci_pipeline
,
source: :push
)
}
let
!
(
:web_pipeline
)
{
build
(
:ci_pipeline
,
source: :web
)
}
let
!
(
:api_pipeline
)
{
build
(
:ci_pipeline
,
source: :api
)
}
let
!
(
:webide_pipeline
)
{
build
(
:ci_pipeline
,
source: :webide
)
}
let
!
(
:child_pipeline
)
{
build
(
:ci_pipeline
,
source: :parent_pipeline
)
}
let
(
:push_pipeline
)
{
build
(
:ci_pipeline
,
source: :push
)
}
let
(
:web_pipeline
)
{
build
(
:ci_pipeline
,
source: :web
)
}
let
(
:api_pipeline
)
{
build
(
:ci_pipeline
,
source: :api
)
}
let
(
:webide_pipeline
)
{
build
(
:ci_pipeline
,
source: :webide
)
}
let
(
:child_pipeline
)
{
build
(
:ci_pipeline
,
source: :parent_pipeline
)
}
let
(
:pipelines
)
{
[
push_pipeline
,
web_pipeline
,
api_pipeline
,
webide_pipeline
,
child_pipeline
]
}
it
'contains pipelines having CI only sources'
do
...
...
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