Sha256: 9673432fff91d755220804271179906b914cc5637a14915fcd9c24699c45d0e4
Contents?: true
Size: 562 Bytes
Versions: 11
Compression:
Stored size: 562 Bytes
Contents
require "spec_helper" module SocialNetworking describe ProfileAnswer, type: :model do fixtures :all let(:old_answer) { social_networking_profile_answers(:profile_answer1) } it "validates the uniqueness of a profile question and profile" do new_answer = ProfileAnswer.new(old_answer.attributes).tap(&:valid?) expect(new_answer.errors[:social_networking_profile_question_id].size) .to eq 1 expect(new_answer.errors[:social_networking_profile_question_id][0]) .to eq "has already been answered" end end end
Version data entries
11 entries across 11 versions & 1 rubygems