gitlab-org--gitlab-foss/spec/uploaders/attachment_uploader_spec.rb

15 lines
518 B
Ruby
Raw Normal View History

2016-08-18 14:31:44 +00:00
require 'spec_helper'
describe AttachmentUploader do
2018-01-29 17:57:34 +00:00
let(:note) { create(:note, :with_attachment) }
let(:uploader) { note.attachment }
let(:upload) { create(:upload, :attachment_upload, model: uploader.model) }
2016-08-18 14:31:44 +00:00
2018-01-29 17:57:34 +00:00
subject { uploader }
2018-01-29 17:57:34 +00:00
it_behaves_like 'builds correct paths',
store_dir: %r[uploads/-/system/note/attachment/],
upload_path: %r[uploads/-/system/note/attachment/],
absolute_path: %r[#{CarrierWave.root}/uploads/-/system/note/attachment/]
2016-08-18 14:31:44 +00:00
end