Sha256: 2707762f569dd87095ae69b73e6bac71389339a3a196cf375b75bb1607420640
Contents?: true
Size: 1.13 KB
Versions: 71
Compression:
Stored size: 1.13 KB
Contents
require File.expand_path('../spec_helper', __FILE__) if File.exist?(File.expand_path('../credentials.yaml', __FILE__)) credentials = YAML.load_file(File.expand_path('../credentials.yaml', __FILE__)) else credentials = { "endpoint" => 'https://sandbox-rest.avatax.com', "username" => ENV['SANDBOX_USERNAME'], "password" => ENV['SANDBOX_PASSWORD'], } end describe AvaTax do describe ".client" do it "should be a AvaTax::Client" do expect(AvaTax.client).to be_a AvaTax::Client end end describe ".endpoint" do it "should return the default endpoint" do expect(AvaTax.endpoint).to eq credentials['endpoint'] end end describe ".endpoint=" do it "should set the endpoint" do AvaTax.endpoint = 'https://sandbox-rest.avatax.com' expect(AvaTax.endpoint).to eq 'https://sandbox-rest.avatax.com' end end describe ".configure" do AvaTax::Configuration::VALID_OPTIONS_KEYS.each do |key| it "should set the #{key}" do AvaTax.configure do |config| config.send("#{key}=", key) expect(AvaTax.send(key)).to eq key end end end end end
Version data entries
71 entries across 71 versions & 1 rubygems