2016-08-18 10:31:44 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe AttachmentUploader do
|
2018-01-29 12:57:34 -05:00
|
|
|
let(:note) { create(:note, :with_attachment) }
|
|
|
|
let(:uploader) { note.attachment }
|
|
|
|
let(:upload) { create(:upload, :attachment_upload, model: uploader.model) }
|
2016-08-18 10:31:44 -04:00
|
|
|
|
2018-01-29 12:57:34 -05:00
|
|
|
subject { uploader }
|
2017-06-07 23:32:38 -04:00
|
|
|
|
2018-01-29 12:57:34 -05: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 10:31:44 -04:00
|
|
|
end
|