Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/uploaders/gitlab_uploader_spec.rb')
-rw-r--r--spec/uploaders/gitlab_uploader_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/uploaders/gitlab_uploader_spec.rb b/spec/uploaders/gitlab_uploader_spec.rb
index 3bee4875348..4425dd947c0 100644
--- a/spec/uploaders/gitlab_uploader_spec.rb
+++ b/spec/uploaders/gitlab_uploader_spec.rb
@@ -69,6 +69,16 @@ describe GitlabUploader do
end
end
+ describe '#replace_file_without_saving!' do
+ it 'allows file to be replaced without triggering any callbacks' do
+ new_file = CarrierWave::SanitizedFile.new(Tempfile.new)
+
+ expect(subject).not_to receive(:with_callbacks)
+
+ subject.replace_file_without_saving!(new_file)
+ end
+ end
+
describe '#open' do
context 'when trace is stored in File storage' do
context 'when file exists' do