Sha256: 68e3e218a36e1fdb96eeee6449fe9270d6ffc440fa9de99b92d0c1d8c743fa39

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

# encoding: utf-8
require_relative 'spec_helper'
require 'yaml'

require 'libis/tools/config_file'
require 'libis/services/rosetta/sip_handler'

describe 'Rosetta SIP Service' do

  let(:credentials) { Libis::Tools::ConfigFile.new File.join(File.dirname(__FILE__), 'credentials-test.yml') }

  subject(:sip_handler) do
    # noinspection RubyResolve
    Libis::Services::Rosetta::SipHandler.new credentials.rosetta_url,
                                             log: credentials.debug,
                                             log_level: credentials.debug_level
  end

  let(:expected_info) {
    { module: 'PER', stage: 'Finished', status: 'FINISHED' }
  }

  let(:expected_ies) { ['IE403595'] }

  it 'should get SIP info' do

    sip_info = sip_handler.get_info(55010)
    expect(sip_info).not_to be_nil
    expect(sip_info.to_hash).to match expected_info
  end

  it 'should get list of IEs in the SIP' do

    ies = sip_handler.get_ies(55010)
    expect(ies).not_to be_nil
    expect(ies).to match_array expected_ies
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
libis-services-0.0.2 spec/rosetta_sip_spec.rb