Sha256: 2a0b4ba3b33e5fff853125e0444aa281eaf0b60d436aad3f1733d66a074b7034
Contents?: true
Size: 1.39 KB
Versions: 1
Compression:
Stored size: 1.39 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "Voxbone" do before(:each) do # You will need to set the username/password to valid ones in order to run a test @voxbone = Voxbone.new({ :username => 'test', :password => 'test', :log_level => :debug, :base_uri => 'http://sandbox.voxbone.com/VoxAPI/services/VoxAPI?wsdl' }) end it "should instantiate a Voxbone class" do @voxbone.instance_of?(Voxbone).should == true end it "should raise a no method error if an unknown method is called" do begin @voxbone.foobar rescue => error error.class.should == NoMethodError error.to_s.should == "The method foobar does not exist." end end it "should get the trunk list" do trunks = @voxbone.get_trunk_list trunks[:get_trunk_list_response].nil?.should == false end it "should return a list of countries based on geography" do countries = @voxbone.get_countries_list(:type => 'GEOGRAPHIC') countries[:get_countries_list_response][:array_of_countries][:country].nil?.should == false end it "should create a capacity group" do result = @voxbone.create_capacity_group(:name_capacity_group => 'Foobar', :capacity => '100') result[:create_capacity_group_response][:capacity_group][:name].should == 'Foobar' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
voxbone-0.0.1 | spec/voxbone_spec.rb |