Sha256: 657585b5f88cb7c9bee7fd56c093065b6835831b5d23bde5aead622dc57def1c
Contents?: true
Size: 720 Bytes
Versions: 18
Compression:
Stored size: 720 Bytes
Contents
# frozen_string_literal: true describe Spotlight::AttachmentUploader do let(:mounter) { Spotlight::Attachment.new(id: '5') } subject(:attachment_uploader) { described_class.new(mounter, 'mounted_as') } describe '#store_dir' do let(:store_dir) { attachment_uploader.store_dir } it 'is prefixed with "uploads/spotlight"' do expect(store_dir).to start_with 'uploads/spotlight/' end it "includes the mounter's class name" do expect(store_dir).to match '/attachment/' end it 'includes the mounted_as option' do expect(store_dir).to match '/mounted_as/' end it "ends with the mounter's id" do expect(store_dir).to end_with "/#{mounter.id}" end end end
Version data entries
18 entries across 18 versions & 1 rubygems