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
1ac2812f
Commit
1ac2812f
authored
Mar 15, 2021
by
lauraMon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleans up some build specs
parent
3a5369e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
39 deletions
+0
-39
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+0
-39
No files found.
spec/models/ci/build_spec.rb
View file @
1ac2812f
...
...
@@ -821,45 +821,6 @@ RSpec.describe Ci::Build do
{
cache:
[{
key:
"key"
,
paths:
[
"public"
],
policy:
"pull-push"
}]
}
end
context
'with multiple_cache_per_job FF disabled'
do
before
do
stub_feature_flags
(
multiple_cache_per_job:
false
)
end
let
(
:options
)
{
{
cache:
{
key:
"key"
,
paths:
[
"public"
],
policy:
"pull-push"
}
}
}
subject
{
build
.
cache
}
context
'when build has cache'
do
before
do
allow
(
build
).
to
receive
(
:options
).
and_return
(
options
)
end
context
'when project has jobs_cache_index'
do
before
do
allow_any_instance_of
(
Project
).
to
receive
(
:jobs_cache_index
).
and_return
(
1
)
end
it
{
is_expected
.
to
be_an
(
Array
).
and
all
(
include
(
key:
"key-1"
))
}
end
context
'when project does not have jobs_cache_index'
do
before
do
allow_any_instance_of
(
Project
).
to
receive
(
:jobs_cache_index
).
and_return
(
nil
)
end
it
{
is_expected
.
to
eq
([
options
[
:cache
]])
}
end
end
context
'when build does not have cache'
do
before
do
allow
(
build
).
to
receive
(
:options
).
and_return
({})
end
it
{
is_expected
.
to
eq
([])
}
end
end
subject
{
build
.
cache
}
context
'when build has cache'
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