Sha256: e2c3bcedb1683a104c3345426fd709df2e2a233c7a6f3c4a461e1a66336ddc7c

Contents?: true

Size: 616 Bytes

Versions: 1

Compression:

Stored size: 616 Bytes

Contents

require 'spec_helper'

describe GroupDocs::Api::Helpers::AccessMode do
  subject do
    GroupDocs::Storage::Folder.new
  end

  describe '#parse_access_mode' do
    it 'returns downcased symbol if string is passed' do
      subject.send(:parse_access_mode, 'Public').should == :public
    end

    it 'returns capitalized string if symbol is passed' do
      subject.send(:parse_access_mode, :public).should == 'Public'
    end

    it 'raises error if argument is not string or symbol' do
      lambda { subject.send(:parse_access_mode, 1) }.should raise_error(ArgumentError)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
groupdocs-2.3.0 spec/groupdocs/api/helpers/access_mode_helper_spec.rb