Sha256: 805098522d50a7b05760e100312d73a5cfe1566bc7a4b7214715a53160e995ce
Contents?: true
Size: 821 Bytes
Versions: 16
Compression:
Stored size: 821 Bytes
Contents
require 'spec_helper' describe Qbrick::Asset, type: :model do let :asset do create(:asset) end let :uploader do u = Qbrick::AssetUploader.new(asset, :file) u.store! File.open(Qbrick::Engine.root.join('spec/dummy/app/assets/images/spec-image.png')) u end before do Qbrick::AssetUploader.enable_processing = true end after do Qbrick::AssetUploader.enable_processing = false end it 'has a thumbnail' do expect(uploader).to respond_to(:thumb) end it 'makes the image readable only to the owner and not executable' do expect(uploader.permissions).to eq(0600) end describe '#file_type' do it 'has a file_type' do expect(asset).to respond_to(:file_type) end it 'is symbolized' do expect(asset.file_type).to be_a(Symbol) end end end
Version data entries
16 entries across 16 versions & 1 rubygems