Sha256: ea4e839a8bacfe5e42b9859cd2a83706d6e3d8155760df6df0518cc441e42f8e

Contents?: true

Size: 905 Bytes

Versions: 2

Compression:

Stored size: 905 Bytes

Contents

require 'spec_helper'

describe Myfinance::Http do
  subject { Myfinance::Http.new('b552dd5a8598ca089b91c5e355a83b86e4696aefac9eaa05') }

  describe '#get' do
    let(:http_method) { :get }
    let(:url) { '/accounts' }
    let(:params) { {} }

    it_behaves_like 'available http request methods'
  end

  describe '#post' do
    let(:http_method) { :post }
    let(:url) { '/entities' }
    let(:params) { { entity: { name: 'Second entity' } } }

    it_behaves_like 'available http request methods'
  end

  describe '#put' do
    let(:http_method) { :put }
    let(:url) { '/entities/3798' }
    let(:params) { { entity: { name: 'Second updated entity' } } }

    it_behaves_like 'available http request methods'
  end

  describe '#delete' do
    let(:http_method) { :delete }
    let(:url) { '/entities/3799' }
    let(:params) { {} }

    it_behaves_like 'available http request methods'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
myfinance-0.2.0 spec/lib/myfinance/http_spec.rb
myfinance-0.1.0 spec/lib/myfinance/http_spec.rb