Sha256: 9d637d3de0d9edc670c9d2faf50f2b574b31b2aaf1313bfb4238e2835bceb1e9

Contents?: true

Size: 1.02 KB

Versions: 4

Compression:

Stored size: 1.02 KB

Contents

require 'spec_helper'

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

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

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

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

    it { is_expected.not_to be_nil }
    it { is_expected.to include('walletables') }
  end

  describe 'should get information of first walletable for the company' do
    subject { walletable.list(company_id)['walletables'].first }

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

Version data entries

4 entries across 4 versions & 1 rubygems

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