Sha256: 3d0ef7edaf64e91ff6507952e7eb2c70d2707c44652ed681b38d098822b6bb02
Contents?: true
Size: 1.15 KB
Versions: 6
Compression:
Stored size: 1.15 KB
Contents
require "spec_helper" describe :has_both_file_and_group_spec do let(:subject) do PostsWithCollectionAndFile.new( title: "Post title", group: GROUP_CDN_URL, file: FILE_CDN_URL ) end after :each do Rails.cache.delete FILE_CDN_URL Rails.cache.delete GROUP_CDN_URL end it 'creates empty post' do expect(PostsWithCollectionAndFile.create).to be_persisted end it "should respond to has_uploadcare_file? method" do is_expected.to respond_to("has_file_as_uploadcare_file?".to_sym) end it "should respond to has_uploadcare_group? method" do is_expected.to respond_to("has_group_as_uploadcare_group?".to_sym) end it ":has_uploadcare_file? should return true" do is_expected.to be_has_file_as_uploadcare_file is_expected.to be_has_group_as_uploadcare_group end it ":has_uploadcare_group? should return false" do is_expected.not_to be_has_group_as_uploadcare_file is_expected.not_to be_has_file_as_uploadcare_group end it "should have uploadcare file" do expect(subject.group).to be_an(Uploadcare::Rails::Group) expect(subject.file).to be_an(Uploadcare::Rails::File) end end
Version data entries
6 entries across 6 versions & 1 rubygems