Sha256: 73b484802114d4d0e364f0a9a6c7b63c4caa410c0d8c242fa920c75f74450ad8
Contents?: true
Size: 693 Bytes
Versions: 6
Compression:
Stored size: 693 Bytes
Contents
require 'spec_helper' describe Uploadcare::Rails::File, :vcr do let(:post) { Post.new(title: 'Post title', file: FILE_CDN_URL) } context 'when object is not persisted' do it 'its file is not loaded' do expect(post.file).not_to be_loaded end end skip { expect(Rails.cache.read(post.file.cdn_url)).to be_nil } skip 'rails cache should updates after load call' do post.file.load! cached = Rails.cache.read FILE_CDN_URL cached.should be_kind_of(Hash) cached['datetime_uploaded'].should be_kind_of(String) end skip 'file should stay loaded' do post.file.loaded?.should == false post.file.load! post.file.loaded?.should == true end end
Version data entries
6 entries across 6 versions & 1 rubygems