Sha256: 4a404ec82bf482842af10f1fc8be51cee6ce5e7bfb978386419670d2d5a05b30
Contents?: true
Size: 1.67 KB
Versions: 26
Compression:
Stored size: 1.67 KB
Contents
require File.dirname(__FILE__) + '/../../../../../spec_helper' include OpenEHR::RM::Common::Generic include OpenEHR::RM::Support::Identification include OpenEHR::RM::DataTypes::Text include OpenEHR::RM::DataTypes::Quantity::DateTime describe AuditDetails do before(:each) do committer = stub(PartyProxy, :namespace => 'UNKNOWN') change_type = stub(DvCodedText, :value =>'creation') time = stub(DvDateTime, :value => '2009-10-03T16:24:19.0Z') desc = DvText.new(:value => 'test environment') @audit_details = AuditDetails.new(:system_id => 'MAGI', :committer => committer, :time_committed => time, :change_type => change_type, :description => desc) end it 'should be an instance of AuditDetails' do @audit_details.should be_an_instance_of AuditDetails end it 'system_id should be MAGI' do @audit_details.system_id.should == 'MAGI' end it 'committer namespece should be UNKNOWN' do @audit_details.committer.namespace.should == 'UNKNOWN' end it 'change_type.value should be creation' do @audit_details.change_type.value.should == 'creation' end it 'description should be test environment' do @audit_details.description.value.should == 'test environment' end it 'should raise ArgumentError when system_id was assigned nil' do lambda { @audit_details.system_id = nil }.should raise_error ArgumentError end it 'should raise ArgumentError when time_commited is nil' do lambda { @audit_details.time_committed = nil }.should raise_error ArgumentError end end
Version data entries
26 entries across 26 versions & 2 rubygems