Sha256: 8a6377771acc17698ec4b04d4696aa5bcf63bbc0da471de7c8ab47c472e3310d

Contents?: true

Size: 701 Bytes

Versions: 22

Compression:

Stored size: 701 Bytes

Contents

require 'spec_helper'

describe GroupDocs::Document::MetaData do

  it_behaves_like GroupDocs::Api::Entity

  it { should have_accessor(:id)          }
  it { should have_accessor(:guid)        }
  it { should have_accessor(:page_count)  }
  it { should have_accessor(:views_count) }
  it { should have_accessor(:last_view)   }

  describe '#last_view=' do
    it 'converts passed hash to GroupDocs::Document::View object' do
      subject.last_view = { :document => { :id => 1, :name => 'test.pdf' } }
      subject.last_view.should be_a(GroupDocs::Document::View)
      subject.last_view.document.file.id.should == 1
      subject.last_view.document.file.name.should == 'test.pdf'
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
groupdocs-2.2.0 spec/groupdocs/document/metadata_spec.rb
groupdocs-2.1.0 spec/groupdocs/document/metadata_spec.rb
groupdocs-2.0.0 spec/groupdocs/document/metadata_spec.rb
groupdocs-1.9.0 spec/groupdocs/document/metadata_spec.rb
groupdocs-1.8.1 spec/groupdocs/document/metadata_spec.rb
groupdocs-1.8.0 spec/groupdocs/document/metadata_spec.rb
groupdocs-1.7.0 spec/groupdocs/document/metadata_spec.rb
groupdocs-1.6.0 spec/groupdocs/document/metadata_spec.rb
groupdocs-1.5.9 spec/groupdocs/document/metadata_spec.rb
groupdocs-1.5.8 spec/groupdocs/document/metadata_spec.rb
groupdocs-1.5.7 spec/groupdocs/document/metadata_spec.rb
groupdocs-1.5.6 spec/groupdocs/document/metadata_spec.rb
groupdocs-1.5.5 spec/groupdocs/document/metadata_spec.rb
groupdocs-1.5.4 spec/groupdocs/document/metadata_spec.rb
groupdocs-1.5.3 spec/groupdocs/document/metadata_spec.rb
groupdocs-1.5.2 spec/groupdocs/document/metadata_spec.rb
groupdocs-1.5.1 spec/groupdocs/document/metadata_spec.rb
groupdocs-1.5.0 spec/groupdocs/document/metadata_spec.rb
groupdocs-1.4.2 spec/groupdocs/document/metadata_spec.rb
groupdocs-1.4.1 spec/groupdocs/document/metadata_spec.rb