displays voter name if already voted

This commit is contained in:
rgarcia
2016-09-19 18:37:37 +02:00
committed by kikito
parent 8dc7285681
commit b54aee5702
4 changed files with 13 additions and 5 deletions

View File

@@ -61,6 +61,10 @@ class CensusApi
end
end
def name
"#{data[:datos_habitante][:item][:nombre]} #{data[:datos_habitante][:item][:apellido1]}"
end
private
def data
@@ -106,7 +110,7 @@ class CensusApi
end
def stubbed_valid_response
{get_habita_datos_response: {get_habita_datos_return: {datos_habitante: { item: {fecha_nacimiento_string: "31-12-1980", identificador_documento: "12345678Z", descripcion_sexo: "Varón" }}, datos_vivienda: {item: {codigo_postal: "28013", codigo_distrito: "01"}}}}}
{get_habita_datos_response: {get_habita_datos_return: {datos_habitante: { item: {fecha_nacimiento_string: "31-12-1980", identificador_documento: "12345678Z", descripcion_sexo: "Varón", nombre: "José", apellido1: "García" }}, datos_vivienda: {item: {codigo_postal: "28013", codigo_distrito: "01"}}}}}
end
def stubbed_invalid_response