Sha256: 87890dbab6c1672a14b701814895b4c1a84c2ca5896c0177dfcb05c3febc1769

Contents?: true

Size: 695 Bytes

Versions: 19

Compression:

Stored size: 695 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

19 entries across 19 versions & 1 rubygems

Version Path
groupdocs-1.9.0 spec/groupdocs/storage_spec.rb
groupdocs-1.8.1 spec/groupdocs/storage_spec.rb
groupdocs-1.8.0 spec/groupdocs/storage_spec.rb
groupdocs-1.7.0 spec/groupdocs/storage_spec.rb
groupdocs-1.6.0 spec/groupdocs/storage_spec.rb
groupdocs-1.5.9 spec/groupdocs/storage_spec.rb
groupdocs-1.5.8 spec/groupdocs/storage_spec.rb
groupdocs-1.5.7 spec/groupdocs/storage_spec.rb
groupdocs-1.5.6 spec/groupdocs/storage_spec.rb
groupdocs-1.5.5 spec/groupdocs/storage_spec.rb
groupdocs-1.5.4 spec/groupdocs/storage_spec.rb
groupdocs-1.5.3 spec/groupdocs/storage_spec.rb
groupdocs-1.5.2 spec/groupdocs/storage_spec.rb
groupdocs-1.5.1 spec/groupdocs/storage_spec.rb
groupdocs-1.5.0 spec/groupdocs/storage_spec.rb
groupdocs-1.4.2 spec/groupdocs/storage_spec.rb
groupdocs-1.4.1 spec/groupdocs/storage_spec.rb
groupdocs-1.4.0 spec/groupdocs/storage_spec.rb
groupdocs-1.3.0 spec/groupdocs/storage_spec.rb