Sha256: e1b4bcba010b7871b17926c3a42967ebc82dd5142c3d92ce4b9c8e4a0f28063c
Contents?: true
Size: 947 Bytes
Versions: 6
Compression:
Stored size: 947 Bytes
Contents
describe Spotlight::FeaturedImageUploader do let(:mounter) { FactoryGirl.create(:featured_image) } subject(:featured_image_uploader) { described_class.new(mounter, 'mounted_as') } describe '#extension_white_list' do it 'is the configured array of approved extension to be uploaded' do expect(featured_image_uploader.extension_white_list).to eq Spotlight::Engine.config.allowed_upload_extensions end end describe '#store_dir' do let(:store_dir) { featured_image_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 '/featured_image/' 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
6 entries across 6 versions & 1 rubygems