2016-09-08 10:25:33 -05:00
|
|
|
# frozen_string_literal: true
|
2016-07-26 17:00:00 -05:00
|
|
|
require 'test_helper'
|
|
|
|
|
|
|
|
class QuizTest < ActiveSupport::TestCase
|
2017-06-05 11:27:48 -05:00
|
|
|
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
|
2016-07-26 17:00:00 -05:00
|
|
|
end
|