# frozen_string_literal: true

require 'rails_helper'

RSpec.describe Question, type: :model do
  context 'validation' do
    it { should validate_presence_of(:question) }
    it { should validate_presence_of(:correct_answer) }
    it { should validate_presence_of(:question_type) }
    it { should define_enum_for(:question_type) }
  end

  context 'validate relation' do
    it { should belong_to(:quiz) }
  end
end
