admin controller tests, sans question

This commit is contained in:
Mark Moser
2016-08-18 15:35:17 -05:00
parent 6a3f652dd7
commit 430097b6ef
21 changed files with 275 additions and 55 deletions

View File

@ -1,4 +1,7 @@
class Quiz < ApplicationRecord
has_many :questions, -> { order(:sort) }
has_many :candidates
validates_presence_of :dept
validates_presence_of :unit
end

View File

@ -1,4 +1,8 @@
class User < ApplicationRecord
has_secure_password
has_many :candidates, foreign_key: "recruiter_id"
validates_presence_of :email
validates_presence_of :name
validates_presence_of :role
end