Sha256: 63f904ca2437d9d9c53add4dcd520d96e1df896d3496ef600ad0e44b4bc23808
Contents?: true
Size: 739 Bytes
Versions: 6
Compression:
Stored size: 739 Bytes
Contents
require 'spec_helper' module FinePrint describe Signature do it 'can''t be associated with unpublished contracts' do contract = FactoryGirl.create(:contract) expect(contract.is_published?).to be_false expect(contract.can_be_updated?).to be_true sig = FactoryGirl.build(:signature) sig.contract = contract expect(sig.save).to be_false contract.reload expect(contract.can_be_updated?).to be_true end it 'prevents contract from being updated' do sig = FactoryGirl.build(:signature) contract = sig.contract expect(contract.can_be_updated?).to be_true sig.save! contract.reload expect(contract.can_be_updated?).to be_false end end end
Version data entries
6 entries across 6 versions & 1 rubygems