Sha256: 5b62fa640235666e74d2969f6fb235d4d2bff124e2c90a0baa54721f7939b8cd

Contents?: true

Size: 1.03 KB

Versions: 27

Compression:

Stored size: 1.03 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) { [{pid: '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.map(&:to_h)).to match_array expected_ies
  end

end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
libis-services-1.1.0 spec/rosetta_sip_spec.rb
libis-services-1.0.13 spec/rosetta_sip_spec.rb
libis-services-1.0.12 spec/rosetta_sip_spec.rb
libis-services-1.0.11 spec/rosetta_sip_spec.rb
libis-services-1.0.10 spec/rosetta_sip_spec.rb
libis-services-1.0.7 spec/rosetta_sip_spec.rb
libis-services-1.0.6 spec/rosetta_sip_spec.rb
libis-services-1.0.5 spec/rosetta_sip_spec.rb
libis-services-1.0.2 spec/rosetta_sip_spec.rb
libis-services-1.0.1 spec/rosetta_sip_spec.rb
libis-services-1.0.0 spec/rosetta_sip_spec.rb
libis-services-0.2.1 spec/rosetta_sip_spec.rb
libis-services-0.2.0 spec/rosetta_sip_spec.rb
libis-services-0.1.18 spec/rosetta_sip_spec.rb
libis-services-0.1.17 spec/rosetta_sip_spec.rb
libis-services-0.1.16 spec/rosetta_sip_spec.rb
libis-services-0.1.15 spec/rosetta_sip_spec.rb
libis-services-0.1.14 spec/rosetta_sip_spec.rb
libis-services-0.1.13 spec/rosetta_sip_spec.rb
libis-services-0.1.12 spec/rosetta_sip_spec.rb