Create tests for models

This commit is contained in:
nasia 2017-06-10 15:17:19 +03:00
parent 7ee9b2966a
commit 9103f511a7
3 changed files with 41 additions and 0 deletions

View file

@ -1,6 +1,8 @@
class CallForBooth < ActiveRecord::Base
belongs_to :conference
has_one :conference
validates :start_date, :end_date, :booth_limit, presence: true
validate :before_end_of_conference
validate :start_date_before_end_date