Sha256: ffd6a929843e4f1061aa8ddbcc6c3e14a2c88471208ccfad1ec1d5efdfd6ce95

Contents?: true

Size: 743 Bytes

Versions: 4

Compression:

Stored size: 743 Bytes

Contents

require 'spec_helper'

describe GenericWork do
  subject { FactoryGirl.build(:generic_work) }

  it_behaves_like 'with_access_rights'
  it_behaves_like 'with_related_works'
  it_behaves_like 'is_embargoable'
  it_behaves_like 'has_dc_metadata'
  it_behaves_like 'has_common_solr_fields'
  it_behaves_like 'remotely_identified', :doi

  it { should have_unique_field(:available) }
  it { should have_unique_field(:human_readable_type) }

  context '#rights' do
    it 'has a default value' do
      GenericWork.new.rights.should == 'All rights reserved'
    end
  end

  context '#as_json' do
    it 'returns the human readable type' do
      subject.as_json({})[:curation_concern_type].should == subject.human_readable_type
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
curate-0.5.6 spec/repository_models/generic_work_spec.rb
curate-0.5.5 spec/repository_models/generic_work_spec.rb
curate-0.5.4 spec/repository_models/generic_work_spec.rb
curate-0.5.2 spec/repository_models/generic_work_spec.rb