Sha256: c7d988d43093e39924be4282f78b95642d26b790377c9ee22f7808768ce2b12b

Contents?: true

Size: 684 Bytes

Versions: 10

Compression:

Stored size: 684 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.id.should   == 1
      subject.last_view.document.name.should == 'test.pdf'
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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