Sha256: 75946637afd2aed9c5eced2b4bba76820bd5c40b4a720581905c6bb339def3d4
Contents?: true
Size: 662 Bytes
Versions: 5
Compression:
Stored size: 662 Bytes
Contents
require 'spec_helper' describe FinePrint do it 'gets unsigned contracts' do alpha_1 = FactoryGirl.create(:published_contract, :name => 'alpha') beta_1 = FactoryGirl.create(:published_contract, :name => 'beta') user = mock_model 'DummyUser', :id => -1 alpha_1_sig = FactoryGirl.create(:signature, :contract => alpha_1, :user => user) beta_1_sig = FactoryGirl.create(:signature, :contract => beta_1, :user => user) alpha_2 = alpha_1.draft_copy alpha_2.update_attributes(:content => 'foo') alpha_2.publish expect(FinePrint.get_unsigned_contract_names(:names => ['beta', 'alpha'], :user => user)).to eq ['alpha'] end end
Version data entries
5 entries across 5 versions & 1 rubygems