spec/models/withdraw_spec.rb in enju_library-0.2.0.beta.9 vs spec/models/withdraw_spec.rb in enju_library-0.2.0.beta.10

- old
+ new

@@ -6,9 +6,15 @@ it "should change circulation_status" do withdraw = FactoryGirl.create(:withdraw) withdraw.item.circulation_status.name.should eq 'Removed' withdraw.item.use_restriction.name.should eq 'Not For Loan' end + + it "should not withdraw rented item" do + withdraw = Withdraw.new(librarian: users(:librarian1)) + withdraw.item = items(:item_00013) + withdraw.valid?.should be_falsy + end end # == Schema Information # # Table name: withdraws