demarches-normaliennes/spec/models/champ_spec.rb

18 lines
521 B
Ruby
Raw Normal View History

2015-11-03 10:48:40 +01:00
require 'spec_helper'
describe Champ do
2015-11-03 10:48:40 +01:00
describe 'database columns' do
it { is_expected.to have_db_column(:value) }
end
describe 'associations' do
it { is_expected.to belong_to(:dossier) }
2015-11-05 11:21:44 +01:00
it { is_expected.to belong_to(:type_de_champ) }
2015-11-03 10:48:40 +01:00
end
describe 'delegation' do
2015-11-05 11:21:44 +01:00
it { is_expected.to delegate_method(:libelle).to(:type_de_champ) }
it { is_expected.to delegate_method(:type_champs).to(:type_de_champ) }
it { is_expected.to delegate_method(:order_place).to(:type_de_champ) }
2015-11-03 10:48:40 +01:00
end
end