Sha256: a7312e1febf2ae452f21f9fb88fe1204c59f1f6e74beb02fb48eccf77c07e970
Contents?: true
Size: 1.39 KB
Versions: 14
Compression:
Stored size: 1.39 KB
Contents
module WebService module Client require 'test_helper' class SoapActionsTest < Test::Unit::TestCase def setup @base_url = "http://bobcatdev.library.nyu.edu" end def test_respond_to VCR.use_cassette('client nonexistent method') do client = Exlibris::Primo::WebService::Client::Search.new :base_url => @base_url assert(client.respond_to? :get_record) assert((not client.respond_to?(:nonexistent_action))) end end def test_nonexistent_action VCR.use_cassette('client nonexistent method') do client = Exlibris::Primo::WebService::Client::Search.new :base_url => @base_url assert_raise(NoMethodError) { client.nonexistent_action } end end def test_no_arguments VCR.use_cassette('client action no arguments') do client = Exlibris::Primo::WebService::Client::Search.new :base_url => @base_url assert_raise(ArgumentError, Savon::SOAPFault) { client.get_record } end end def test_too_many_arguments VCR.use_cassette('client too many arguments') do client = Exlibris::Primo::WebService::Client::Search.new :base_url => @base_url assert_raise(ArgumentError, Savon::SOAPFault) { client.get_record "1", "2" } end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems