2017-08-17 22:00:37 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe AttachmentUploader do
|
2018-03-17 18:26:18 +05:30
|
|
|
let(:note) { create(:note, :with_attachment) }
|
|
|
|
let(:uploader) { note.attachment }
|
|
|
|
let(:upload) { create(:upload, :attachment_upload, model: uploader.model) }
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
subject { uploader }
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
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/]
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|