summaryrefslogtreecommitdiff
path: root/spec/workers
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-06-17 12:58:26 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-06-17 12:58:26 +0200
commitd63673d6df703664aa95909c723df08449c573b5 (patch)
treed45572273e1b6634385016da09acd21b7308fed8 /spec/workers
parentfaee4763f7a166772bb40945f82da4b25a95e7d5 (diff)
downloadgitlab-ce-d63673d6df703664aa95909c723df08449c573b5.tar.gz
Make sure that artifacts_file is nullified after removing artifactsmake-sure-that-artifacts-file-is-saved
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/expire_build_artifacts_worker_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/workers/expire_build_artifacts_worker_spec.rb b/spec/workers/expire_build_artifacts_worker_spec.rb
index e3827cae9a6..7d6668920c0 100644
--- a/spec/workers/expire_build_artifacts_worker_spec.rb
+++ b/spec/workers/expire_build_artifacts_worker_spec.rb
@@ -20,6 +20,10 @@ describe ExpireBuildArtifactsWorker do
it 'does remove files' do
expect(build.reload.artifacts_file.exists?).to be_falsey
end
+
+ it 'does nullify artifacts_file column' do
+ expect(build.reload.artifacts_file_identifier).to be_nil
+ end
end
context 'with not yet expired artifacts' do
@@ -32,6 +36,10 @@ describe ExpireBuildArtifactsWorker do
it 'does not remove files' do
expect(build.reload.artifacts_file.exists?).to be_truthy
end
+
+ it 'does not nullify artifacts_file column' do
+ expect(build.reload.artifacts_file_identifier).not_to be_nil
+ end
end
context 'without expire date' do
@@ -44,6 +52,10 @@ describe ExpireBuildArtifactsWorker do
it 'does not remove files' do
expect(build.reload.artifacts_file.exists?).to be_truthy
end
+
+ it 'does not nullify artifacts_file column' do
+ expect(build.reload.artifacts_file_identifier).not_to be_nil
+ end
end
context 'for expired artifacts' do