Sha256: 0db6f33abd909a360be2a1696f0f6cba4f48509f2c8a07525836e6a68b02f923

Contents?: true

Size: 829 Bytes

Versions: 10

Compression:

Stored size: 829 Bytes

Contents

require 'spec_helper'

describe GroupDocs::Document::Change do

  it_behaves_like GroupDocs::Api::Entity

  it { should have_accessor(:id)   }
  it { should have_accessor(:type) }
  it { should have_accessor(:box)  }
  it { should have_accessor(:text) }
  it { should have_accessor(:page) }

  describe '#type' do
    it 'returns type as symbol' do
      subject.type = 'delete'
      subject.type.should == :delete
    end
  end

  describe '#box=' do
    it 'converts passed hash to GroupDocs::Document::Rectangle object' do
      subject.box = { x: 0.90, y: 0.05, width: 0.06745, height: 0.005967 }
      subject.box.should be_a(GroupDocs::Document::Rectangle)
      subject.box.x.should == 0.90
      subject.box.y.should == 0.05
      subject.box.w.should == 0.06745
      subject.box.h.should == 0.005967
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
groupdocs-1.2.11 spec/groupdocs/document/change_spec.rb
groupdocs-1.2.10 spec/groupdocs/document/change_spec.rb
groupdocs-1.2.9 spec/groupdocs/document/change_spec.rb
groupdocs-1.2.8 spec/groupdocs/document/change_spec.rb
groupdocs-1.2.7 spec/groupdocs/document/change_spec.rb
groupdocs-1.2.6 spec/groupdocs/document/change_spec.rb
groupdocs-1.2.3 spec/groupdocs/document/change_spec.rb
groupdocs-1.2.2 spec/groupdocs/document/change_spec.rb
groupdocs-1.2.1 spec/groupdocs/document/change_spec.rb
groupdocs-1.2.0 spec/groupdocs/document/change_spec.rb