Sha256: d900494a3629e28ce3e055597d6807c375513a07e24a2b4f1bfaa783c0993a60
Contents?: true
Size: 1.39 KB
Versions: 11
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::SOAP::Fault) { 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::SOAP::Fault) { client.get_record "1", "2" } end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems