Sha256: 4541e3bacea5c60e8de704b41db7974351e5da11fc313b80c6ba356b445a0b3f
Contents?: true
Size: 1.18 KB
Versions: 4
Compression:
Stored size: 1.18 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
avatax-22.5.0 | spec/avatax_spec.rb |
avatax-22.3.0 | spec/avatax_spec.rb |
avatax-22.2.1 | spec/avatax_spec.rb |
avatax-22.2.0 | spec/avatax_spec.rb |