Sha256: 18d11cfaf26dd535ff6b7e2bca78c30e1cb3b59d1bfeea16e9031f9efea5bbe1

Contents?: true

Size: 922 Bytes

Versions: 26

Compression:

Stored size: 922 Bytes

Contents

# -*- encoding: utf-8 -*-
require 'spec_helper'

describe CheckedItem do
  fixtures :all

  it "should respond to available_for_checkout?" do
    checked_items(:checked_item_00001).available_for_checkout?.should_not be_true
  end

  it "should change circulation_status when a missing item is found" do
    basket = FactoryGirl.create(:basket)
    checked_item = CheckedItem.new
    checked_item.item = items(:item_00024)
    checked_item.basket = basket
    checked_item.save!
    items(:item_00024).circulation_status.name.should eq 'Available On Shelf'
  end
end

# == Schema Information
#
# Table name: checked_items
#
#  id           :integer          not null, primary key
#  item_id      :integer          not null
#  basket_id    :integer          not null
#  due_date     :datetime         not null
#  created_at   :datetime         not null
#  updated_at   :datetime         not null
#  librarian_id :integer
#

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
enju_circulation-0.1.0.pre35 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre34 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre33 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre32 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre31 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre30 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre29 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre28 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre27 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre26 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre25 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre24 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre23 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre22 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre21 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre20 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre19 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre18 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre17 spec/models/checked_item_spec.rb
enju_circulation-0.1.0.pre16 spec/models/checked_item_spec.rb