uppercases document number
This commit is contained in:
@@ -19,6 +19,7 @@ class Verification::Residence
|
||||
self.date_of_birth = parse_date('date_of_birth', attrs)
|
||||
attrs = remove_date('date_of_birth', attrs)
|
||||
super
|
||||
self.document_number.upcase!
|
||||
end
|
||||
|
||||
def save
|
||||
|
||||
@@ -40,6 +40,13 @@ describe Verification::Residence do
|
||||
end
|
||||
end
|
||||
|
||||
describe "new" do
|
||||
it "should upcase document number" do
|
||||
residence = Verification::Residence.new({document_number: "x1234567z"})
|
||||
expect(residence.document_number).to eq("X1234567Z")
|
||||
end
|
||||
end
|
||||
|
||||
describe "save" do
|
||||
|
||||
it "should store document number and type" do
|
||||
|
||||
Reference in New Issue
Block a user