Sha256: fbcf28b50a08fc8ff5e56c54a0ec1c1a4a0741a69e652d55557c6dbc44d1211d

Contents?: true

Size: 842 Bytes

Versions: 4

Compression:

Stored size: 842 Bytes

Contents

require 'spec_helper'

describe Freee::Tax do
  let(:client_id) { get_client_id }
  let(:secret_key) { get_secret_key }
  let(:token) { get_token }
  let(:company_id) { get_company_id }
  let(:tax) { Freee::Tax }

  before(:each) do
    Freee::Base.config(client_id, secret_key, token)
  end

  describe 'should can be able to create instance' do
    subject { tax.list(company_id) }
    it { is_expected.not_to be_nil }
    it { is_expected.to be_instance_of(Freee::Response::Tax) }
  end

  describe 'should get item of tax for the company' do
    subject { tax.list(company_id) }

    it { is_expected.to include('taxes') } 
  end

  describe 'should get item of first tax for the company' do
    subject { tax.list(company_id)['taxes'].first }

    it { is_expected.to include('id') }
    it { is_expected.to include('name') }
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
freee-0.3.1 spec/tax_spec.rb
freee-0.3.0 spec/tax_spec.rb
freee-0.2.0 spec/tax_spec.rb
freee-0.1.0 spec/tax_spec.rb