skill-assessment-app/test/models/quiz_test.rb
2017-06-05 11:27:48 -05:00

12 lines
286 B
Ruby

# frozen_string_literal: true
require 'test_helper'
class QuizTest < ActiveSupport::TestCase
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