BigW Consortium Gitlab

attachment_uploader_spec.rb 518 Bytes
Newer Older
1 2 3
require 'spec_helper'

describe AttachmentUploader do
4 5 6
  let(:note) { create(:note, :with_attachment) }
  let(:uploader) { note.attachment }
  let(:upload) { create(:upload, :attachment_upload, model: uploader.model) }
7

8
  subject { uploader }
9

10 11 12 13
  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/]
14
end