Sha256: 623a9dc08f4019ab4279755b868e66090de46b64bfd55dbfe31e28ba6420ef25
Contents?: true
Size: 967 Bytes
Versions: 4
Compression:
Stored size: 967 Bytes
Contents
require 'spec_helper' module Sipity RSpec.describe Entity, type: :model do describe 'database configuration', no_clean: true do subject { described_class } its(:column_names) { is_expected.to include("proxy_for_global_id") } its(:column_names) { is_expected.to include("workflow_id") } its(:column_names) { is_expected.to include("workflow_state_id") } end subject { described_class.new } describe 'delegations', no_clean: true do it { is_expected.to delegate_method(:workflow_state_name).to(:workflow_state).as(:name) } it { is_expected.to delegate_method(:workflow_name).to(:workflow).as(:name) } end describe '#proxy_for' do let(:work) { FactoryGirl.create(:generic_work) } let(:entity) { Sipity::Entity.new(proxy_for_global_id: work.to_global_id) } it 'will retrieve based on a GlobalID of the object' do expect(entity.proxy_for).to eq(work) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
hyrax-1.0.5 | spec/models/sipity/entity_spec.rb |
hyrax-1.0.4 | spec/models/sipity/entity_spec.rb |
hyrax-1.0.3 | spec/models/sipity/entity_spec.rb |
hyrax-1.0.2 | spec/models/sipity/entity_spec.rb |