spec/rosetta_pds_spec.rb in libis-services-1.0.10 vs spec/rosetta_pds_spec.rb in libis-services-1.0.11
- old
+ new
@@ -8,26 +8,27 @@
require 'libis/services/rosetta/producer_handler'
require 'libis/services/rosetta/deposit_handler'
describe 'Rosetta PDS Service' do
- let!(:credentials) { Libis::Tools::ConfigFile.new File.join(File.dirname(__FILE__), 'credentials-test.yml') }
+ let!(:credentials) { Libis::Tools::ConfigFile.new File.join(File.dirname(__FILE__), 'credentials-prod.yml') }
let!(:pds_handler) do
# noinspection RubyResolve
Libis::Services::Rosetta::PdsHandler.new(credentials.pds_url)
end
- let(:handle) { pds_handler.login(admin_usr, admin_pwd, admin_ins) }
+ let(:handle) { pds_handler.login(admin_usr, admin_pwd, admin_pds_ins) }
# noinspection RubyResolve
let(:admin) { credentials.admin }
# noinspection RubyResolve
let(:admin_usr) { admin.user }
# noinspection RubyResolve
let(:admin_pwd) {admin.password}
# noinspection RubyResolve
let(:admin_ins) {admin.institute}
+ let(:admin_pds_ins) {admin.institute_pds}
it 'should login and return a handle' do
expect(handle).to_not be_nil
end
@@ -60,10 +61,10 @@
it 'should return patron info' do
bor_info = pds_handler.user_info handle
expect(bor_info[:bor_info][:id]).to eq admin_usr
expect(bor_info[:bor_info][:name]).to eq admin_usr
- expect(bor_info[:bor_info][:institute]).to eq admin_ins
+ expect(bor_info[:bor_info][:institute]).to eq admin_pds_ins
end
it 'should logout using a valid handle' do
expect(pds_handler.logout(handle)).to be_truthy
\ No newline at end of file