Sha256: 9bbf7c338bed6d4aa0c4b49d6494f7c78f1d91cd5c7222cb00890566a1b06a4e

Contents?: true

Size: 689 Bytes

Versions: 34

Compression:

Stored size: 689 Bytes

Contents

require 'spec_helper'

describe GroupDocs::Storage do
  describe '.info!' do
    before(:each) do
      mock_api_server(load_json('storage_info'))
    end

    it 'accepts access credentials hash' do
      lambda do
        described_class.info!(client_id: 'client_id', private_key: 'private_key')
      end.should_not raise_error(ArgumentError)
    end

    it 'returns a hash of information' do
      described_class.info!.should be_a(Hash)
    end

    it 'converts total space to MB' do
      described_class.info![:total_space].should == '1024 MB'
    end

    it 'converts available space to MB' do
      described_class.info![:available_space].should == '1020 MB'
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
groupdocs-1.2.11 spec/groupdocs/storage_spec.rb
groupdocs-1.2.10 spec/groupdocs/storage_spec.rb
groupdocs-1.2.9 spec/groupdocs/storage_spec.rb
groupdocs-1.2.8 spec/groupdocs/storage_spec.rb
groupdocs-1.2.7 spec/groupdocs/storage_spec.rb
groupdocs-1.2.6 spec/groupdocs/storage_spec.rb
groupdocs-1.2.3 spec/groupdocs/storage_spec.rb
groupdocs-1.2.2 spec/groupdocs/storage_spec.rb
groupdocs-1.2.1 spec/groupdocs/storage_spec.rb
groupdocs-1.2.0 spec/groupdocs/storage_spec.rb
groupdocs-1.1.0 spec/groupdocs/storage_spec.rb
groupdocs-1.0.0 spec/groupdocs/storage_spec.rb
groupdocs-0.3.11 spec/groupdocs/storage_spec.rb
groupdocs-0.3.10 spec/groupdocs/storage_spec.rb
groupdocs-0.3.9 spec/groupdocs/storage_spec.rb
groupdocs-0.3.8 spec/groupdocs/storage_spec.rb
groupdocs-0.3.7 spec/groupdocs/storage_spec.rb
groupdocs-0.3.6 spec/groupdocs/storage_spec.rb
groupdocs-0.3.5 spec/groupdocs/storage_spec.rb
groupdocs-0.3.0 spec/groupdocs/storage_spec.rb