Sha256: 8a16df82f82edefb2f89ce2ebc2d8b3767f4bbc9c9b707a2f2ea0fdf40f3beae

Contents?: true

Size: 854 Bytes

Versions: 2

Compression:

Stored size: 854 Bytes

Contents

require 'spec_helper'

describe QBFC::Item do

  before(:each) do 
    @sess = mock(QBFC::Session)
    @ole_wrapper = mock(QBFC::OLEWrapper)
  end

  it "is a base class" do
    QBFC::Item.is_base_class?.should be_true
  end
  
  describe ".find" do
    it "should return subclass objects"
  end
  
  describe ".add_special" do
    before(:each) do 
      @request = mock("QBFC::Request")
      @response = mock("QBFC::Request#response")
    end
    
    it "should add a Special Account" do
      QBFC::Request.should_receive(:new).with(@sess, "SpecialItemAdd").and_return(@request)
      @request.should_receive(:special_item_type=).with(QBFC_CONST::SitFinanceCharge)
      @request.should_receive(:response).and_return(@response)
  
      QBFC::Item.add_special(@sess, QBFC_CONST::SitFinanceCharge)
    end
  end
  
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
jm81-qbfc-0.3.0 spec/unit/item_spec.rb
qbfc-0.3.0 spec/unit/item_spec.rb