spec/models/checkout_spec.rb in enju_circulation-0.1.0.pre24 vs spec/models/checkout_spec.rb in enju_circulation-0.1.0.pre25
- old
+ new
@@ -3,12 +3,14 @@
describe Checkout do
#pending "add some examples to (or delete) #{__FILE__}"
fixtures :all
- it "should respond to checkout_renewable?" do
- checkouts(:checkout_00001).checkout_renewable?.should be_true
- checkouts(:checkout_00002).checkout_renewable?.should be_false
+ it "should respond to renewable?" do
+ checkouts(:checkout_00001).save
+ checkouts(:checkout_00001).errors[:base].should eq []
+ checkouts(:checkout_00002).save
+ checkouts(:checkout_00002).errors[:base].should eq [I18n.t('checkout.this_item_is_reserved')]
end
it "should respond to reserved?" do
checkouts(:checkout_00001).reserved?.should be_false
checkouts(:checkout_00002).reserved?.should be_true