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
Jérome Perrin
gitlab-ce
Commits
33db51f9
Commit
33db51f9
authored
Jun 13, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve ExpireBuildArtifactsWorker spec
parent
f6de5937
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
spec/workers/expire_build_artifacts_worker_spec.rb
spec/workers/expire_build_artifacts_worker_spec.rb
+4
-9
No files found.
spec/workers/expire_build_artifacts_worker_spec.rb
View file @
33db51f9
...
...
@@ -35,18 +35,13 @@ describe ExpireBuildArtifactsWorker do
end
context
'for expired artifacts'
do
let!
(
:build
)
{
create
(
:ci_build
,
:artifacts
,
artifacts_expire_at:
Time
.
now
-
7
.
days
)
}
let!
(
:build
)
{
create
(
:ci_build
,
artifacts_expire_at:
Time
.
now
-
7
.
days
)
}
before
do
build
.
erase_artifacts!
build
.
save
it
'does not erase artifacts'
do
expect_any_instance_of
(
Ci
::
Build
).
not_to
have_received
(
:erase_artifacts!
)
end
it
do
expect_any_instance_of
(
Ci
::
Build
).
not_to
receive
(
:erase_artifacts!
)
worker
.
perform
it
'does expire'
do
expect
(
build
.
reload
.
artifacts_expired?
).
to
be_truthy
end
end
...
...
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