Sha256: 8e73dff5c9455a41e5a93cc6dfff8687edc0c793e0ad57d98b6d1634785f3497

Contents?: true

Size: 793 Bytes

Versions: 4

Compression:

Stored size: 793 Bytes

Contents

# encoding: UTF-8
require 'spec_helper'

describe HL7::Message::Segment::ERR do
  context 'general' do
    before :all do
      @base_err = 'ERR||OBR^1|100^Segment sequence error^HL70357|E|||Missing required OBR segment|Email help desk for further information on this error||||^NET^Internet^helpdesk@hl7.org'
    end

    it 'creates an ERR segment' do
      expect do
        err = HL7::Message::Segment::ERR.new( @base_err )
        expect(err).not_to be_nil
        expect(err.to_s).to eq @base_err
      end.not_to raise_error
    end

    it 'allows access to an ERR segment' do
      expect do
        err = HL7::Message::Segment::ERR.new( @base_err )
        expect(err.severity).to eq 'E'
        expect(err.error_location).to eq 'OBR^1'
      end.not_to raise_error
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruby-hl7-1.3.3 spec/err_segment_spec.rb
ruby-hl7-1.3.2 spec/err_segment_spec.rb
ruby-hl7-1.3.1 spec/err_segment_spec.rb
ruby-hl7-1.3.0 spec/err_segment_spec.rb