Files
grecia/spec/models/signature_spec.rb
2016-12-20 12:21:45 +01:00

46 lines
958 B
Ruby

require 'rails_helper'
describe Signature
describe "validations" do
it "should be valid"
it "should be valid if user exists"
it "should not be valid if already voted"
it "should not be valid if not in census"
end
describe "in census" do
it "checks for all document_types"
end
describe "verify" do
describie "valid" do
it "sets status to verified"
it "asigns vote to user"
end
describe "invalid"
it "sets status to error"
it "does not asign any votes"
end
end
describe "assign vote" do
describe "existing user" do
it "assigns vote to user"
it "does not assign vote to user if already voted"
it "marks the vote as coming from a signature"
end
describe "inexistent user" do
it "creates a user with that document number"
it "assign the vote to newly created user"
it "marks the vote as coming from a signature"
end
end
end