Sha256: 47676419fe64e1f6bc5f2d2e4982b96313ffad5c3ae8642148ed85a1277e1614

Contents?: true

Size: 842 Bytes

Versions: 26

Compression:

Stored size: 842 Bytes

Contents

require File.dirname(__FILE__) + '/../../../../../spec_helper'
include OpenEHR::RM::Support::Identification

describe PartyRef do
  before(:each) do
    object_id = stub(ObjectID, :value => 'test')
    @party_ref = PartyRef.new(:id => object_id,
                              :type => 'PERSON',
                              :namespace => 'test')
  end

  it 'should be an instance of PartyRef' do
    @party_ref.should be_an_instance_of PartyRef
  end

  %w[PERSON ORGANISATION GROUP AGENT ROLE PARTY ACTOR].each do |type|
    it "should not raise ArgumentError with #{type} type" do
      lambda {
        @party_ref.type = type
      }.should_not raise_error ArgumentError
    end
  end

  it 'should raise ArgumentError with UNKNOWN type' do
    lambda {
      @party_ref.type = 'UNKNOWN'
    }.should raise_error ArgumentError
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
openehr-1.2.8 spec/lib/openehr/rm/support/identification/party_ref_spec.rb
openehr-1.2.7 spec/lib/openehr/rm/support/identification/party_ref_spec.rb
openehr-1.2.6 spec/lib/openehr/rm/support/identification/party_ref_spec.rb
openehr-1.2.5 spec/lib/openehr/rm/support/identification/party_ref_spec.rb
openehr-1.2.4 spec/lib/openehr/rm/support/identification/party_ref_spec.rb
openehr-1.2.3 spec/lib/openehr/rm/support/identification/party_ref_spec.rb
openehr-1.2.2 spec/lib/openehr/rm/support/identification/party_ref_spec.rb
openehr-1.2.1 spec/lib/openehr/rm/support/identification/party_ref_spec.rb
openehr-1.2.0 spec/lib/openehr/rm/support/identification/party_ref_spec.rb
openehr-1.1.6 spec/lib/openehr/rm/support/identification/party_ref_spec.rb
openehr-1.1.5 spec/lib/openehr/rm/support/identification/party_ref_spec.rb
openehr-1.1.4 spec/lib/openehr/rm/support/identification/party_ref_spec.rb
openehr-1.1.3 spec/lib/openehr/rm/support/identification/party_ref_spec.rb
openehr-1.1.2 spec/lib/openehr/rm/support/identification/party_ref_spec.rb
openehr-1.1.1 spec/lib/openehr/rm/support/identification/party_ref_spec.rb
openehr-1.1.0 spec/lib/openehr/rm/support/identification/party_ref_spec.rb
open_ehr-1.0.2 spec/lib/open_ehr/rm/support/identification/party_ref_spec.rb
open_ehr-1.0.1 spec/lib/open_ehr/rm/support/identification/party_ref_spec.rb
open_ehr-1.0.0 spec/lib/open_ehr/rm/support/identification/party_ref_spec.rb
open_ehr-0.9.5 spec/lib/open_ehr/rm/support/identification/party_ref_spec.rb