mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Add survey related tests
This commit is contained in:
parent
68a8ec2204
commit
c278e547ce
8 changed files with 198 additions and 1 deletions
14
spec/models/survey_reply_spec.rb
Normal file
14
spec/models/survey_reply_spec.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue