Sha256: ec7fcf4b039681da996aa10e9ca61917035bebdf8ea2669c4c0291f8dc585cff

Contents?: true

Size: 483 Bytes

Versions: 7

Compression:

Stored size: 483 Bytes

Contents

require 'spec_helper'

module FinePrint
  describe Signature do
    it 'can''t be associated with unpublished contracts' do
      contract = FactoryGirl.create(:fine_print_contract)
      expect(contract.is_published?).to eq false
      expect(contract.signatures).to be_empty

      sig = FactoryGirl.build(:fine_print_signature)
      sig.contract = contract
      expect(sig.save).to eq false

      contract.reload
      expect(contract.signatures).to be_empty
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fine_print-2.3.0 spec/models/signature_spec.rb
fine_print-2.2.1 spec/models/signature_spec.rb
fine_print-2.2.0 spec/models/signature_spec.rb
fine_print-2.1.1 spec/models/signature_spec.rb
fine_print-2.0.3 spec/models/signature_spec.rb
fine_print-2.0.2 spec/models/signature_spec.rb
fine_print-2.0.1 spec/models/signature_spec.rb