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
db104aaf
Commit
db104aaf
authored
Aug 01, 2019
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve test for .with_needs
parent
1e7aafdc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+3
-2
No files found.
spec/models/ci/build_spec.rb
View file @
db104aaf
...
...
@@ -185,8 +185,9 @@ describe Ci::Build do
describe
'.with_needs'
do
let!
(
:build
)
{
create
(
:ci_build
)
}
let!
(
:build_b
)
{
create
(
:ci_build
)
}
let!
(
:build_need_a
)
{
create
(
:ci_build_need
,
build:
build
)
}
let!
(
:build_need_b
)
{
create
(
:ci_build_need
,
build:
build
)
}
let!
(
:build_need_b
)
{
create
(
:ci_build_need
,
build:
build
_b
)
}
context
'when passing build name'
do
subject
{
described_class
.
with_needs
(
build_need_a
.
name
)
}
...
...
@@ -197,7 +198,7 @@ describe Ci::Build do
context
'when not passing any build name'
do
subject
{
described_class
.
with_needs
}
it
{
is_expected
.
to
contain_exactly
(
build
)
}
it
{
is_expected
.
to
contain_exactly
(
build
,
build_b
)
}
end
context
'when not matching build name'
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