Merge pull request #1383 from consul/poll-voter-validations

removes poll voter demographic validations
This commit is contained in:
Juanjo Bazán
2017-02-01 14:51:04 +01:00
committed by GitHub
2 changed files with 0 additions and 8 deletions

View File

@@ -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 }

View File

@@ -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)