limit candidate quiz dropdown to only show "active" quizzes

completes #105
This commit is contained in:
Mark Moser
2017-06-05 11:27:48 -05:00
parent e6cc00ca57
commit 15a5b6b706
4 changed files with 18 additions and 4 deletions

View File

@ -2,7 +2,10 @@
require 'test_helper'
class QuizTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
test "all_active only returns quizzes with questions" do
empty_quiz = quizzes(:empty_quiz)
quizzes = Quiz.all_active
refute quizzes.any? { |q| q.id == empty_quiz.id }
end
end