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

Version Path
social_networking-0.11.8 spec/models/social_networking/profile_answer_spec.rb
social_networking-0.11.7 spec/models/social_networking/profile_answer_spec.rb
social_networking-0.11.6 spec/models/social_networking/profile_answer_spec.rb
social_networking-0.11.5 spec/models/social_networking/profile_answer_spec.rb
social_networking-0.11.4 spec/models/social_networking/profile_answer_spec.rb
social_networking-0.11.3 spec/models/social_networking/profile_answer_spec.rb
social_networking-0.11.2 spec/models/social_networking/profile_answer_spec.rb
social_networking-0.11.1 spec/models/social_networking/profile_answer_spec.rb
social_networking-0.11.0 spec/models/social_networking/profile_answer_spec.rb
social_networking-0.10.0 spec/models/social_networking/profile_answer_spec.rb
social_networking-0.9.3 spec/models/social_networking/profile_answer_spec.rb