summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-03-29 13:21:57 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-03-30 10:44:18 +0200
commitf2674c7b98c69668093583e4590223b7040b5b33 (patch)
tree5a967b8893ab4e73b3d0adea001e364848e65489 /spec/services
parent0b8cefd3b2385a21cfed779bd659978c0402766d (diff)
downloadgitlab-ce-f2674c7b98c69668093583e4590223b7040b5b33.tar.gz
Refactor uploads rewriter used when moving issue
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/issues/move_service_spec.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/spec/services/issues/move_service_spec.rb b/spec/services/issues/move_service_spec.rb
index 1cc2daa908f..d4e7294968c 100644
--- a/spec/services/issues/move_service_spec.rb
+++ b/spec/services/issues/move_service_spec.rb
@@ -162,12 +162,9 @@ describe Issues::MoveService, services: true do
end
context 'issue description with uploads' do
- let(:path) { Rails.root + 'spec/fixtures/rails_sample.jpg' }
- let(:file) { fixture_file_upload(path, 'image/jpg') }
- let(:uploader) { FileUploader.new(old_project) }
- let!(:store) { uploader.store!(file) }
+ let(:uploader) { build(:file_uploader, project: old_project) }
let(:markdown) { uploader.to_h[:markdown] }
- let(:description) { "Text and #{markdown}"}
+ let(:description) { "Text and #{markdown}" }
include_context 'issue move executed'
@@ -176,8 +173,6 @@ describe Issues::MoveService, services: true do
expect(new_issue.description)
.to match(/Text and #{FileUploader::MARKDOWN_PATTERN}/)
end
-
- after { uploader.remove! }
end
end