spec/models/checkout_spec.rb in enju_circulation-0.0.34 vs spec/models/checkout_spec.rb in enju_circulation-0.0.35
- old
+ new
@@ -44,9 +44,17 @@
end
it "should respond to send_overdue_notification" do
Checkout.send_overdue_notification.should eq 1
end
+
+ it "should destroy all history" do
+ user = users(:user1)
+ old_count = Checkout.count
+ Checkout.remove_all_history(user)
+ user.checkouts.count.should eq 0
+ Checkout.count.should eq old_count
+ end
end
# == Schema Information
#
# Table name: checkouts