Sha256: fd13f999e16ba0cbf2c26f79b45a414fb2524ee79065ae7543f48244d1ed5da5

Contents?: true

Size: 659 Bytes

Versions: 38

Compression:

Stored size: 659 Bytes

Contents

require 'spec_helper'

describe 'Costs' do
  let(:client)   { create_client }
  let!(:account) { create_account(client: client) }

  it 'should return an empty array with no costs' do
    expect(account.costs.all).to be_empty
  end

  it 'should get costs for an account', :mock_only do
    create_cost(client, account: account)
    expect(account.costs.all).not_to be_empty
  end

  it 'should search costs', :mock_only do
    create_cost(client, account: account, level: 'total')
    create_cost(client, account: account, level: 'summarized')
    costs = account.costs.select { |c| c.level == 'total' }
    expect(costs.first.level).to eq 'total'
  end
end

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
ey-core-3.6.4 spec/costs_spec.rb
ey-core-3.6.3 spec/costs_spec.rb
ey-core-3.6.1 spec/costs_spec.rb
groove-ey-core-3.6.3 spec/costs_spec.rb
groove-ey-core-3.6.2 spec/costs_spec.rb
groove-ey-core-3.6.1 spec/costs_spec.rb
ey-core-3.5.0 spec/costs_spec.rb
ey-core-3.4.4 spec/costs_spec.rb
ey-core-3.4.2 spec/costs_spec.rb
ey-core-3.4.1 spec/costs_spec.rb
ey-core-3.4.0 spec/costs_spec.rb
ey-core-3.3.1 spec/costs_spec.rb
ey-core-3.3.0 spec/costs_spec.rb
ey-core-3.2.6 spec/costs_spec.rb
ey-core-3.2.5 spec/costs_spec.rb
ey-core-3.2.4 spec/costs_spec.rb
ey-core-3.2.3 spec/costs_spec.rb
ey-core-3.2.2 spec/costs_spec.rb
ey-core-3.2.1 spec/costs_spec.rb
ey-core-3.2.0 spec/costs_spec.rb