Sha256: 09721118a43a5d3734aa8c6b0f84ceda88868dbc3e9569d900e393200f06c3e3

Contents?: true

Size: 574 Bytes

Versions: 14

Compression:

Stored size: 574 Bytes

Contents

require 'spec_helper'

describe InvoicesController do
  render_views

  let(:expected) { File.read('spec/fixtures/rails/invoices.iif') }

  describe '#index' do

    before do
      get :index, format: 'iif'
    end

    it 'respond with rendered iif' do
      response.body.should eq expected
    end

    it 'respond with QuickBooks content type' do
      response.header['Content-Type'].should eq 'application/qbooks'
    end

    it 'respond with filename: batman.iif' do
      response.header['Content-Disposition'].should =~ /filename="batman\.iif"/
    end
  end
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
riif-1.1.0 spec/controllers/invoices_controller_spec.rb
riif-1.0.0 spec/controllers/invoices_controller_spec.rb
riif-0.9.0 spec/controllers/invoices_controller_spec.rb
riif-0.8.0 spec/controllers/invoices_controller_spec.rb
riif-0.7.0 spec/controllers/invoices_controller_spec.rb
iif-0.6.1 spec/controllers/invoices_controller_spec.rb
qb_iif-0.1.2 spec/controllers/invoices_controller_spec.rb
qb_iif-0.1.1 spec/controllers/invoices_controller_spec.rb
qb_iif-0.1.0 spec/controllers/invoices_controller_spec.rb
riif-0.6.0 spec/controllers/invoices_controller_spec.rb
riif-0.5.0 spec/controllers/invoices_controller_spec.rb
riif-0.4.0 spec/controllers/invoices_controller_spec.rb
riif-0.3.0 spec/controllers/invoices_controller_spec.rb
riif-0.2.0 spec/controllers/invoices_controller_spec.rb