Sha256: 7cc29074a278690dbcc9853aa28f22ea7b2d332438ae0c0b888dbeb8b7aa9f17

Contents?: true

Size: 573 Bytes

Versions: 3

Compression:

Stored size: 573 Bytes

Contents

require 'spec_helper'

RSpec.describe Chartmogul::V1::Import::Invoices do

  let(:client) { Chartmogul::Client.new }

  describe '#create' do
    let(:url) { 'https://api.chartmogul.com/v1/import/customers/customer-id/invoices' }
    let(:body)  { [ {foo: 'bar'} ] }
    let(:query) { {} }

    before do
      stub_request(:post, url).with(body: { invoices: body }.to_json).to_return(status: 201)
    end

    subject { client.import.customers.invoices.create('customer-id', body) }

    it_should_behave_like 'a base ChartMogul API V1 requests', method: :post
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
chartmogul_client-0.0.6 spec/chartmogul/v1/import/invoices_spec.rb
chartmogul_client-0.0.5 spec/chartmogul/v1/import/invoices_spec.rb
chartmogul_client-0.0.4 spec/chartmogul/v1/import/invoices_spec.rb