debian-mirror-gitlab/spec/uploaders/attachment_uploader_spec.rb
2018-03-17 18:26:18 +05:30

14 lines
518 B
Ruby

require 'spec_helper'
describe AttachmentUploader do
let(:note) { create(:note, :with_attachment) }
let(:uploader) { note.attachment }
let(:upload) { create(:upload, :attachment_upload, model: uploader.model) }
subject { uploader }
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/]
end