Sha256: d98ec9258e52cda02c8c52f65224840e1fea1e696e61bb86769f7079fa7528db
Contents?: true
Size: 761 Bytes
Versions: 8
Compression:
Stored size: 761 Bytes
Contents
require 'rails_helper' RSpec.describe Withdraw, type: :model do fixtures :all 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 # # id :integer not null, primary key # basket_id :integer # item_id :integer # librarian_id :integer # created_at :datetime not null # updated_at :datetime not null #
Version data entries
8 entries across 6 versions & 2 rubygems