summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-06-22 08:01:06 +0000
committerDouwe Maan <douwe@gitlab.com>2018-06-22 08:01:06 +0000
commit1980b9c5636e08a8b5a63793536afd4840864c56 (patch)
tree05cc2bbde1b2aa74750a131ec6488c1314c4d6df
parent5bcf5de277ebb3d27f9edd1a0cd060fc6493420e (diff)
parent6037c17cd44107b4f63cf291018764fa175e029c (diff)
downloadgitlab-ce-1980b9c5636e08a8b5a63793536afd4840864c56.tar.gz
Merge branch 'unify-object_storage_spec.rb' into 'master'
Unify object_storage_spec.rb with EE See merge request gitlab-org/gitlab-ce!20069
-rw-r--r--spec/uploaders/object_storage_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/uploaders/object_storage_spec.rb b/spec/uploaders/object_storage_spec.rb
index c7f5694ff43..7e673681c31 100644
--- a/spec/uploaders/object_storage_spec.rb
+++ b/spec/uploaders/object_storage_spec.rb
@@ -191,6 +191,18 @@ describe ObjectStorage do
it "calls a cache path" do
expect { |b| uploader.use_file(&b) }.to yield_with_args(%r[tmp/cache])
end
+
+ it "cleans up the cached file" do
+ cached_path = ''
+
+ uploader.use_file do |path|
+ cached_path = path
+
+ expect(File.exist?(cached_path)).to be_truthy
+ end
+
+ expect(File.exist?(cached_path)).to be_falsey
+ end
end
end