Sha256: 9f50cff3dda2e2a99933a8ce0a5d3a7d51d8368a46972698849895c0454ec5d8
Contents?: true
Size: 948 Bytes
Versions: 3
Compression:
Stored size: 948 Bytes
Contents
require 'spec_helper' describe GroupDocs::Storage::Package do it_behaves_like GroupDocs::Api::Entity it { should have_accessor(:name) } it { should have_accessor(:objects) } describe '#add' do it 'adds objects to be packed later' do subject.objects = ['object 1'] subject.objects.should_receive(:<<).with('object 2') subject.add('object 2') end it 'is aliased to #<<' do subject.should have_alias(:<<, :add) end end describe '#create!' do before(:each) do mock_api_server(load_json('package_create')) subject.objects = [double(:name => 'object 1', :path => 'path 1')] end it 'accepts access credentials hash' do lambda do subject.create!(:client_id => 'client_id', :private_key => 'private_key') end.should_not raise_error() end it 'returns URL for package downloading' do subject.create!.should be_a(String) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
groupdocs-2.2.0 | spec/groupdocs/storage/package_spec.rb |
groupdocs-2.1.0 | spec/groupdocs/storage/package_spec.rb |
groupdocs-2.0.0 | spec/groupdocs/storage/package_spec.rb |