Merge pull request #1383 from consul/poll-voter-validations
removes poll voter demographic validations
This commit is contained in:
@@ -8,9 +8,6 @@ class Poll
|
||||
|
||||
validates :poll_id, presence: true
|
||||
validates :user_id, presence: true
|
||||
validates :geozone_id, presence: true
|
||||
validates :gender, presence: true
|
||||
validates :age, presence: true
|
||||
|
||||
validates :document_number, presence: true, uniqueness: { scope: [:poll_id, :document_type], message: :has_voted }
|
||||
|
||||
|
||||
@@ -23,11 +23,6 @@ describe :voter do
|
||||
expect(voter).to_not be_valid
|
||||
end
|
||||
|
||||
it "should not be valid without a geozone" do
|
||||
voter.user.geozone = nil
|
||||
expect(voter).to_not be_valid
|
||||
end
|
||||
|
||||
it "should be valid if has not voted" do
|
||||
voter = build(:poll_voter, :valid_document)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user