Sha256: 57d56dbd2e5f36faa2594d96161e96bea6c84123a1dd1279cdc1b97794a36693

Contents?: true

Size: 702 Bytes

Versions: 52

Compression:

Stored size: 702 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe VendorDocument do

  describe "incrementing kid_mult for new document" do
    it "should increment kid_mult" do
      @doc = OpenStruct.new(:kid_mult=>0)
      mock(VendorDocument).filter(:kid_date=>Date.today.to_fos_days, :kid_time=>Time.now.as_minutes) {mock!.order(:kid_mult) {[@doc]}}
      VendorDocument.new.kid_mult.should==1
    end

    it "should increment kid_mult" do
      @doc = OpenStruct.new(:kid_mult=>255)
      mock(VendorDocument).filter(:kid_date=>Date.today.to_fos_days, :kid_time=>Time.now.as_minutes) {mock!.order(:kid_mult) {[@doc]}}
      VendorDocument.new.kid_mult.should==0
    end
  end

end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
fossil-0.4.26 spec/models/vendor_document_spec.rb
fossil-0.4.25 spec/models/vendor_document_spec.rb
fossil-0.4.24 spec/models/vendor_document_spec.rb
fossil-0.4.23 spec/models/vendor_document_spec.rb
fossil-0.4.22 spec/models/vendor_document_spec.rb
fossil-0.4.20 spec/models/vendor_document_spec.rb
fossil-0.4.19 spec/models/vendor_document_spec.rb
fossil-0.4.18 spec/models/vendor_document_spec.rb
fossil-0.4.17 spec/models/vendor_document_spec.rb
fossil-0.4.16 spec/models/vendor_document_spec.rb
fossil-0.4.15 spec/models/vendor_document_spec.rb
fossil-0.4.14 spec/models/vendor_document_spec.rb
fossil-0.4.13 spec/models/vendor_document_spec.rb
fossil-0.4.12 spec/models/vendor_document_spec.rb
fossil-0.4.10 spec/models/vendor_document_spec.rb
fossil-0.4.9 spec/models/vendor_document_spec.rb
fossil-0.4.8 spec/models/vendor_document_spec.rb
fossil-0.4.7 spec/models/vendor_document_spec.rb
fossil-0.4.6 spec/models/vendor_document_spec.rb
fossil-0.4.5 spec/models/vendor_document_spec.rb