Sha256: fb7483bb35fc9b8a6144780eb9121579c5a0eb6def14c18dd7fd1d4467cf7ed4

Contents?: true

Size: 994 Bytes

Versions: 24

Compression:

Stored size: 994 Bytes

Contents

require 'spec_helper'

describe GroupDocs::Document::Change do

  it_behaves_like GroupDocs::Api::Entity

  it { should respond_to(:id)    }
  it { should respond_to(:id=)   }
  it { should respond_to(:type)  }
  it { should respond_to(:type=) }
  it { should respond_to(:box)   }
  it { should respond_to(:box=)  }
  it { should respond_to(:text)  }
  it { should respond_to(:text=) }
  it { should respond_to(:page)  }
  it { should respond_to(: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

24 entries across 24 versions & 1 rubygems

Version Path
groupdocs-1.1.0 spec/groupdocs/document/change_spec.rb
groupdocs-1.0.0 spec/groupdocs/document/change_spec.rb
groupdocs-0.3.11 spec/groupdocs/document/change_spec.rb
groupdocs-0.3.10 spec/groupdocs/document/change_spec.rb
groupdocs-0.3.9 spec/groupdocs/document/change_spec.rb
groupdocs-0.3.8 spec/groupdocs/document/change_spec.rb
groupdocs-0.3.7 spec/groupdocs/document/change_spec.rb
groupdocs-0.3.6 spec/groupdocs/document/change_spec.rb
groupdocs-0.3.5 spec/groupdocs/document/change_spec.rb
groupdocs-0.3.0 spec/groupdocs/document/change_spec.rb
groupdocs-0.2.11 spec/groupdocs/document/change_spec.rb
groupdocs-0.2.10 spec/groupdocs/document/change_spec.rb
groupdocs-0.2.9 spec/groupdocs/document/change_spec.rb
groupdocs-0.2.8 spec/groupdocs/document/change_spec.rb
groupdocs-0.2.7 spec/groupdocs/document/change_spec.rb
groupdocs-0.2.6 spec/groupdocs/document/change_spec.rb
groupdocs-0.2.5 spec/groupdocs/document/change_spec.rb
groupdocs-0.2.4 spec/groupdocs/document/change_spec.rb
groupdocs-0.2.3 spec/groupdocs/document/change_spec.rb
groupdocs-0.2.2 spec/groupdocs/document/change_spec.rb