mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
* Survey period constraints * Add abilities * Enforce required questions * Update survey_submssion updated_at * Do a full match of possible answer and user reply
16 lines
374 B
Ruby
16 lines
374 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'spec_helper'
|
|
|
|
describe SurveyReply do
|
|
subject { create(:survey_reply) }
|
|
|
|
describe 'association' do
|
|
it { is_expected.to belong_to(:user) }
|
|
it { is_expected.to belong_to(:survey_question) }
|
|
end
|
|
|
|
describe 'validation' do
|
|
it { is_expected.to validate_uniqueness_of(:survey_question_id).scoped_to(:user_id) }
|
|
end
|
|
end
|