Sha256: 5fdc8e3ff5ca4e85dff8bebca0379d9ec29489a08a7e9242362403e84770231f
Contents?: true
Size: 863 Bytes
Versions: 21
Compression:
Stored size: 863 Bytes
Contents
# coding utf-8 require 'rails_helper' describe 'Règlement', :type => :model do include Fixtures describe 'validations' do before(:each) do @reglement = Adherent::Reglement.new(amount:50) @reglement.payment_id = 1 @reglement.adhesion_id = 9 end it 'est valide' do expect(@reglement).to be_valid end it 'mais pas sans payment_id' do @reglement.payment_id = nil expect(@reglement).not_to be_valid end it 'ni pas sans adhesion_id' do @reglement.adhesion_id = nil expect(@reglement).not_to be_valid end it 'ni sans montant' do @reglement.amount = nil expect(@reglement).not_to be_valid end it 'qui doit être positif' do @reglement.amount = -5.55 expect(@reglement).not_to be_valid end end end
Version data entries
21 entries across 21 versions & 1 rubygems