Sha256: 1292b32a655587d83c19f464b6f44681d43037deafe63afd1f1f05e0ee322e78

Contents?: true

Size: 765 Bytes

Versions: 1

Compression:

Stored size: 765 Bytes

Contents

require 'spec_helper'

describe GroupDocs::DataSource::Field do

  it_behaves_like GroupDocs::Api::Entity

  it { should have_accessor(:name)   }
  it { should have_accessor(:type)   }
  it { should have_accessor(:values) }

  describe '#type=' do
    it 'saves type in machine readable format if symbol is passed' do
      subject.type = :binary
      subject.instance_variable_get(:@type).should == 'Binary'
    end

    it 'does nothing if parameter is not symbol' do
      subject.type = 'Binary'
      subject.instance_variable_get(:@type).should == 'Binary'
    end
  end

  describe '#type' do
    it 'returns type in human-readable format' do
      subject.type = 'Binary'
      subject.type.should == :binary
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
groupdocs-2.3.0 spec/groupdocs/datasource/field_spec.rb