Sha256: 1fd00e7595925fa2db3e7363f6167c378dbcf193c3099773a88832c0cc189327

Contents?: true

Size: 519 Bytes

Versions: 7

Compression:

Stored size: 519 Bytes

Contents

require 'spec_helper'
require 'ostruct'

describe ObjectAccess do

  let(:purl) {
    OpenStruct.new(
      {
        :purl_id => 9999,
        :repo_object_id => 9999,
        :access_count => 0,
        :date_created => DateTime.new(2001,-11,-26,-20,-55,-54,'+7')
      }
    )
  }

  describe '.create_from_purl' do
    it 'should_create_data_in_purl_database' do
      ObjectAccess.create_from_purl(purl)
      result = ObjectAccess.first
      result.repo_object_id.should == purl.repo_object_id
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
curate-0.3.2 spec/models/object_access_spec.rb
curate-0.3.1 spec/models/object_access_spec.rb
curate-0.2.0 spec/models/object_access_spec.rb
curate-0.1.3 spec/models/object_access_spec.rb
curate-0.1.2 spec/models/object_access_spec.rb
curate-0.1.1 spec/models/object_access_spec.rb
curate-0.1.0 spec/models/object_access_spec.rb