arca.rb 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.devcontainer/Dockerfile +8 -0
- data/.devcontainer/devcontainer.json +12 -0
- data/.github/dependabot.yml +12 -0
- data/.github/workflows/ci.yml +16 -0
- data/.github/workflows/release.yml +37 -0
- data/.gitignore +8 -0
- data/.mise.toml +2 -0
- data/.rubocop.yml +8 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +19 -0
- data/CONTRIBUTING.md +48 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +209 -0
- data/Rakefile +10 -0
- data/SECURITY.md +14 -0
- data/arca.gemspec +40 -0
- data/bin/console +7 -0
- data/lib/arca/client.rb +29 -0
- data/lib/arca/core_ext/hash.rb +13 -0
- data/lib/arca/errors/error.rb +13 -0
- data/lib/arca/errors/network_error.rb +15 -0
- data/lib/arca/errors/response_error.rb +18 -0
- data/lib/arca/errors/server_error.rb +6 -0
- data/lib/arca/persona_service_a100.rb +51 -0
- data/lib/arca/persona_service_a4.rb +34 -0
- data/lib/arca/persona_service_a5.rb +46 -0
- data/lib/arca/type_conversions.rb +44 -0
- data/lib/arca/version.rb +5 -0
- data/lib/arca/w_cons_declaracion.rb +66 -0
- data/lib/arca/ws_constancia_inscripcion.rb +34 -0
- data/lib/arca/wsaa.rb +140 -0
- data/lib/arca/wscdc.rb +149 -0
- data/lib/arca/wsfe.rb +205 -0
- data/lib/arca/wsfecred.rb +438 -0
- data/lib/arca/wsrgiva.rb +72 -0
- data/lib/arca.rb +31 -0
- data/test/arca/client_test.rb +43 -0
- data/test/arca/core_ext/hash_test.rb +15 -0
- data/test/arca/persona_service_a100_test.rb +45 -0
- data/test/arca/persona_service_a4_test.rb +31 -0
- data/test/arca/persona_service_a5_test.rb +31 -0
- data/test/arca/test.crt +19 -0
- data/test/arca/test.key +28 -0
- data/test/arca/type_conversions_test.rb +43 -0
- data/test/arca/w_cons_declaracion_test.rb +86 -0
- data/test/arca/ws_constancia_inscripcion_test.rb +87 -0
- data/test/arca/wsaa_test.rb +80 -0
- data/test/arca/wscdc_test.rb +103 -0
- data/test/arca/wsfe_test.rb +319 -0
- data/test/arca/wsfecred_test.rb +162 -0
- data/test/arca/wsrgiva_test.rb +91 -0
- data/test/fixtures/wconsdeclaracion/detallada_estado/success.xml +24 -0
- data/test/fixtures/wconsdeclaracion/detallada_lista_declaraciones/por_fecha_success.xml +39 -0
- data/test/fixtures/wconsdeclaracion/detallada_lista_declaraciones/por_id_inexistente.xml +16 -0
- data/test/fixtures/wconsdeclaracion/detallada_lista_declaraciones/por_id_success.xml +29 -0
- data/test/fixtures/wconsdeclaracion/dummy/success.xml +12 -0
- data/test/fixtures/wconsdeclaracion/wconsdeclaracion.wsdl +2976 -0
- data/test/fixtures/ws_sr_constancia_inscripcion/dummy/success.xml +11 -0
- data/test/fixtures/ws_sr_constancia_inscripcion/get_persona/failure.xml +35 -0
- data/test/fixtures/ws_sr_constancia_inscripcion/get_persona/fault.xml +8 -0
- data/test/fixtures/ws_sr_constancia_inscripcion/get_persona/success.xml +53 -0
- data/test/fixtures/ws_sr_constancia_inscripcion/ws_constancia_inscripcion.wsdl +230 -0
- data/test/fixtures/ws_sr_padron_a100/company_types/success.xml +23 -0
- data/test/fixtures/ws_sr_padron_a100/dummy/success.xml +11 -0
- data/test/fixtures/ws_sr_padron_a100/jurisdictions/success.xml +31 -0
- data/test/fixtures/ws_sr_padron_a100/public_organisms/success.xml +23 -0
- data/test/fixtures/ws_sr_padron_a100.wsdl +125 -0
- data/test/fixtures/ws_sr_padron_a4/dummy/success.xml +11 -0
- data/test/fixtures/ws_sr_padron_a4/get_persona/success.xml +133 -0
- data/test/fixtures/ws_sr_padron_a4.wsdl +229 -0
- data/test/fixtures/ws_sr_padron_a5/dummy/success.xml +11 -0
- data/test/fixtures/ws_sr_padron_a5/get_persona/success.xml +62 -0
- data/test/fixtures/ws_sr_padron_a5.wsdl +283 -0
- data/test/fixtures/wsaa/login_cms/fault.xml +12 -0
- data/test/fixtures/wsaa/login_cms/success.xml +16 -0
- data/test/fixtures/wsaa/login_cms/token_expirado.xml +14 -0
- data/test/fixtures/wsaa/wsaa.wsdl +103 -0
- data/test/fixtures/wscdc/comprobante_constatar/success.xml +22 -0
- data/test/fixtures/wscdc/comprobante_constatar/with_errors.xml +28 -0
- data/test/fixtures/wscdc/comprobante_dummy/success.xml +11 -0
- data/test/fixtures/wscdc/comprobantes_modalidad_consultar/success.xml +22 -0
- data/test/fixtures/wscdc/comprobantes_tipo_consultar/success.xml +22 -0
- data/test/fixtures/wscdc/documentos_tipo_consultar/success.xml +16 -0
- data/test/fixtures/wscdc/opcionales_tipo_consultar/success.xml +14 -0
- data/test/fixtures/wscdc/wscdc.wsdl +305 -0
- data/test/fixtures/wsfe/fe_comp_consultar/success.xml +41 -0
- data/test/fixtures/wsfe/fe_comp_tot_x_request/success.xml +9 -0
- data/test/fixtures/wsfe/fe_comp_ultimo_autorizado/success.xml +11 -0
- data/test/fixtures/wsfe/fe_dummy/success.xml +11 -0
- data/test/fixtures/wsfe/fe_param_get_cotizacion/dolar.xml +13 -0
- data/test/fixtures/wsfe/fe_param_get_cotizacion/inexistente.xml +14 -0
- data/test/fixtures/wsfe/fe_param_get_ptos_venta/success.xml +22 -0
- data/test/fixtures/wsfe/fe_param_get_tipos_cbte/failure_1_error.xml +14 -0
- data/test/fixtures/wsfe/fe_param_get_tipos_cbte/failure_2_errors.xml +18 -0
- data/test/fixtures/wsfe/fe_param_get_tipos_cbte/success.xml +22 -0
- data/test/fixtures/wsfe/fe_param_get_tipos_concepto/success.xml +17 -0
- data/test/fixtures/wsfe/fe_param_get_tipos_doc/success.xml +16 -0
- data/test/fixtures/wsfe/fe_param_get_tipos_iva/success.xml +16 -0
- data/test/fixtures/wsfe/fe_param_get_tipos_monedas/success.xml +22 -0
- data/test/fixtures/wsfe/fe_param_get_tipos_opcional/success.xml +16 -0
- data/test/fixtures/wsfe/fe_param_get_tipos_tributos/success.xml +16 -0
- data/test/fixtures/wsfe/fecae_solicitar/autorizacion_1_cbte.xml +30 -0
- data/test/fixtures/wsfe/fecae_solicitar/autorizacion_2_cbtes.xml +41 -0
- data/test/fixtures/wsfe/fecae_solicitar/dos_observaciones.xml +40 -0
- data/test/fixtures/wsfe/fecae_solicitar/una_observacion.xml +36 -0
- data/test/fixtures/wsfe/fecaea_consultar/success.xml +17 -0
- data/test/fixtures/wsfe/fecaea_reg_informativo/informe_rtdo_parcial.xml +45 -0
- data/test/fixtures/wsfe/fecaea_sin_movimiento_informar/success.xml +12 -0
- data/test/fixtures/wsfe/fecaea_solicitar/caea_ya_otorgado.xml +18 -0
- data/test/fixtures/wsfe/fecaea_solicitar/error_distinto.xml +18 -0
- data/test/fixtures/wsfe/fecaea_solicitar/success.xml +17 -0
- data/test/fixtures/wsfe/wsfe.wsdl +1372 -0
- data/test/fixtures/wsfecred/aceptar_f_e_cred/success.xml +14 -0
- data/test/fixtures/wsfecred/consultar_comprobantes/success.xml +17 -0
- data/test/fixtures/wsfecred/consultar_cta_cte/success.xml +13 -0
- data/test/fixtures/wsfecred/consultar_ctas_ctes/success.xml +16 -0
- data/test/fixtures/wsfecred/consultar_tipos_formas_cancelacion/success.xml +14 -0
- data/test/fixtures/wsfecred/consultar_tipos_motivos_rechazo/success.xml +14 -0
- data/test/fixtures/wsfecred/consultar_tipos_retenciones/failure.xml +14 -0
- data/test/fixtures/wsfecred/consultar_tipos_retenciones/success.xml +14 -0
- data/test/fixtures/wsfecred/dummy/success.xml +11 -0
- data/test/fixtures/wsfecred/wsfecred.wsdl +147 -0
- data/test/fixtures/wsrgiva/consultar_constancia_por_lote/one_error.xml +14 -0
- data/test/fixtures/wsrgiva/consultar_constancia_por_lote/success.xml +26 -0
- data/test/fixtures/wsrgiva/dummy/success.xml +11 -0
- data/test/fixtures/wsrgiva/wsrgiva.wsdl +118 -0
- data/test/support/savon_extensions.rb +43 -0
- data/test/test_helper.rb +44 -0
- metadata +319 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
|
2
|
+
<soap:Body>
|
|
3
|
+
<ns2:aceptarFECredResponse xmlns:ns2="https://ar.gob.afip.wsfecred/FECredService/">
|
|
4
|
+
<aceptarFECredReturn>
|
|
5
|
+
<resultado>A</resultado>
|
|
6
|
+
<idCtaCte>
|
|
7
|
+
<codCtaCte>12345</codCtaCte>
|
|
8
|
+
</idCtaCte>
|
|
9
|
+
<arrayObservaciones/>
|
|
10
|
+
<arrayErrores/>
|
|
11
|
+
</aceptarFECredReturn>
|
|
12
|
+
</ns2:aceptarFECredResponse>
|
|
13
|
+
</soap:Body>
|
|
14
|
+
</soap:Envelope>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
|
2
|
+
<soap:Body>
|
|
3
|
+
<ns2:consultarComprobantesResponse xmlns:ns2="https://ar.gob.afip.wsfecred/FECredService/">
|
|
4
|
+
<consultarComprobantesReturn>
|
|
5
|
+
<arrayComprobantes>
|
|
6
|
+
<comprobante>
|
|
7
|
+
<cbteNro>1</cbteNro>
|
|
8
|
+
<codTipoCmp>1</codTipoCmp>
|
|
9
|
+
</comprobante>
|
|
10
|
+
</arrayComprobantes>
|
|
11
|
+
<nroPagina>1</nroPagina>
|
|
12
|
+
<hayMas>false</hayMas>
|
|
13
|
+
<arrayObservaciones/>
|
|
14
|
+
</consultarComprobantesReturn>
|
|
15
|
+
</ns2:consultarComprobantesResponse>
|
|
16
|
+
</soap:Body>
|
|
17
|
+
</soap:Envelope>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
|
2
|
+
<soap:Body>
|
|
3
|
+
<ns2:consultarCtaCteResponse xmlns:ns2="https://ar.gob.afip.wsfecred/FECredService/">
|
|
4
|
+
<consultarCtaCteReturn>
|
|
5
|
+
<ctaCte>
|
|
6
|
+
<codCtaCte>12345</codCtaCte>
|
|
7
|
+
<estado>Activa</estado>
|
|
8
|
+
</ctaCte>
|
|
9
|
+
<arrayObservaciones/>
|
|
10
|
+
</consultarCtaCteReturn>
|
|
11
|
+
</ns2:consultarCtaCteResponse>
|
|
12
|
+
</soap:Body>
|
|
13
|
+
</soap:Envelope>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
|
2
|
+
<soap:Body>
|
|
3
|
+
<ns2:consultarCtasCtesResponse xmlns:ns2="https://ar.gob.afip.wsfecred/FECredService/">
|
|
4
|
+
<consultarCtasCtesReturn>
|
|
5
|
+
<arrayInfosCtaCte>
|
|
6
|
+
<infoCtaCte>
|
|
7
|
+
<codCtaCte>12345</codCtaCte>
|
|
8
|
+
</infoCtaCte>
|
|
9
|
+
</arrayInfosCtaCte>
|
|
10
|
+
<nroPagina>1</nroPagina>
|
|
11
|
+
<hayMas>false</hayMas>
|
|
12
|
+
<arrayObservaciones/>
|
|
13
|
+
</consultarCtasCtesReturn>
|
|
14
|
+
</ns2:consultarCtasCtesResponse>
|
|
15
|
+
</soap:Body>
|
|
16
|
+
</soap:Envelope>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
|
2
|
+
<soap:Body>
|
|
3
|
+
<ns2:consultarTiposFormasCancelacionResponse xmlns:ns2="https://ar.gob.afip.wsfecred/FECredService/">
|
|
4
|
+
<consultarTiposFormasCancelacionReturn>
|
|
5
|
+
<arrayCodigoDescripcion>
|
|
6
|
+
<codigoDescripcion>
|
|
7
|
+
<codigo>1</codigo>
|
|
8
|
+
<descripcion>Forma cancelación 1</descripcion>
|
|
9
|
+
</codigoDescripcion>
|
|
10
|
+
</arrayCodigoDescripcion>
|
|
11
|
+
</consultarTiposFormasCancelacionReturn>
|
|
12
|
+
</ns2:consultarTiposFormasCancelacionResponse>
|
|
13
|
+
</soap:Body>
|
|
14
|
+
</soap:Envelope>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
|
2
|
+
<soap:Body>
|
|
3
|
+
<ns2:consultarTiposMotivosRechazoResponse xmlns:ns2="https://ar.gob.afip.wsfecred/FECredService/">
|
|
4
|
+
<consultarTiposMotivosRechazoReturn>
|
|
5
|
+
<arrayCodigoDescripcion>
|
|
6
|
+
<codigoDescripcion>
|
|
7
|
+
<codigo>1</codigo>
|
|
8
|
+
<descripcion>Motivo rechazo 1</descripcion>
|
|
9
|
+
</codigoDescripcion>
|
|
10
|
+
</arrayCodigoDescripcion>
|
|
11
|
+
</consultarTiposMotivosRechazoReturn>
|
|
12
|
+
</ns2:consultarTiposMotivosRechazoResponse>
|
|
13
|
+
</soap:Body>
|
|
14
|
+
</soap:Envelope>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
|
2
|
+
<soap:Body>
|
|
3
|
+
<ns2:consultarTiposRetencionesResponse xmlns:ns2="https://ar.gob.afip.wsfecred/FECredService/">
|
|
4
|
+
<consultarTiposRetencionesReturn>
|
|
5
|
+
<arrayErrores>
|
|
6
|
+
<codigoDescripcion>
|
|
7
|
+
<codigo>600</codigo>
|
|
8
|
+
<descripcion>No se corresponden token con firma</descripcion>
|
|
9
|
+
</codigoDescripcion>
|
|
10
|
+
</arrayErrores>
|
|
11
|
+
</consultarTiposRetencionesReturn>
|
|
12
|
+
</ns2:consultarTiposRetencionesResponse>
|
|
13
|
+
</soap:Body>
|
|
14
|
+
</soap:Envelope>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
|
2
|
+
<soap:Body>
|
|
3
|
+
<ns2:consultarTiposRetencionesResponse xmlns:ns2="https://ar.gob.afip.wsfecred/FECredService/">
|
|
4
|
+
<consultarTiposRetencionesReturn>
|
|
5
|
+
<arrayTiposRetenciones>
|
|
6
|
+
<tipoRetencion>
|
|
7
|
+
<codigo>1</codigo>
|
|
8
|
+
<descripcion>Retención 1</descripcion>
|
|
9
|
+
</tipoRetencion>
|
|
10
|
+
</arrayTiposRetenciones>
|
|
11
|
+
</consultarTiposRetencionesReturn>
|
|
12
|
+
</ns2:consultarTiposRetencionesResponse>
|
|
13
|
+
</soap:Body>
|
|
14
|
+
</soap:Envelope>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
|
2
|
+
<soap:Body>
|
|
3
|
+
<ns2:dummyResponse xmlns:ns2="https://ar.gob.afip.wsfecred/FECredService/">
|
|
4
|
+
<return>
|
|
5
|
+
<appserver>OK</appserver>
|
|
6
|
+
<authserver>OK</authserver>
|
|
7
|
+
<dbserver>OK</dbserver>
|
|
8
|
+
</return>
|
|
9
|
+
</ns2:dummyResponse>
|
|
10
|
+
</soap:Body>
|
|
11
|
+
</soap:Envelope>
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
|
3
|
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
|
4
|
+
xmlns:tns="https://ar.gob.afip.wsfecred/FECredService/"
|
|
5
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
6
|
+
name="FECredService"
|
|
7
|
+
targetNamespace="https://ar.gob.afip.wsfecred/FECredService/">
|
|
8
|
+
<wsdl:types>
|
|
9
|
+
<xsd:schema targetNamespace="https://ar.gob.afip.wsfecred/FECredService/">
|
|
10
|
+
<xsd:element name="dummy" type="tns:DummyType"/>
|
|
11
|
+
<xsd:element name="dummyResponse" type="tns:DummyResponseType"/>
|
|
12
|
+
<xsd:complexType name="DummyType">
|
|
13
|
+
<xsd:sequence/>
|
|
14
|
+
</xsd:complexType>
|
|
15
|
+
<xsd:complexType name="DummyResponseType">
|
|
16
|
+
<xsd:sequence>
|
|
17
|
+
<xsd:element name="return" type="tns:DummyReturnType"/>
|
|
18
|
+
</xsd:sequence>
|
|
19
|
+
</xsd:complexType>
|
|
20
|
+
<xsd:complexType name="DummyReturnType">
|
|
21
|
+
<xsd:sequence>
|
|
22
|
+
<xsd:element name="appserver" type="xsd:string"/>
|
|
23
|
+
<xsd:element name="authserver" type="xsd:string"/>
|
|
24
|
+
<xsd:element name="dbserver" type="xsd:string"/>
|
|
25
|
+
</xsd:sequence>
|
|
26
|
+
</xsd:complexType>
|
|
27
|
+
<xsd:complexType name="GenericRequestType"><xsd:sequence><xsd:any minOccurs="0"/></xsd:sequence></xsd:complexType>
|
|
28
|
+
<xsd:complexType name="GenericResponseType"><xsd:sequence><xsd:any minOccurs="0"/></xsd:sequence></xsd:complexType>
|
|
29
|
+
<xsd:element name="consultarTiposRetenciones" type="tns:GenericRequestType"/>
|
|
30
|
+
<xsd:element name="consultarTiposRetencionesResponse" type="tns:GenericResponseType"/>
|
|
31
|
+
<xsd:element name="consultarTiposMotivosRechazo" type="tns:GenericRequestType"/>
|
|
32
|
+
<xsd:element name="consultarTiposMotivosRechazoResponse" type="tns:GenericResponseType"/>
|
|
33
|
+
<xsd:element name="consultarTiposFormasCancelacion" type="tns:GenericRequestType"/>
|
|
34
|
+
<xsd:element name="consultarTiposFormasCancelacionResponse" type="tns:GenericResponseType"/>
|
|
35
|
+
<xsd:element name="consultarCtaCte" type="tns:GenericRequestType"/>
|
|
36
|
+
<xsd:element name="consultarCtaCteResponse" type="tns:GenericResponseType"/>
|
|
37
|
+
<xsd:element name="consultarComprobantes" type="tns:GenericRequestType"/>
|
|
38
|
+
<xsd:element name="consultarComprobantesResponse" type="tns:GenericResponseType"/>
|
|
39
|
+
<xsd:element name="consultarCtasCtes" type="tns:GenericRequestType"/>
|
|
40
|
+
<xsd:element name="consultarCtasCtesResponse" type="tns:GenericResponseType"/>
|
|
41
|
+
<xsd:element name="aceptarFECred" type="tns:GenericRequestType"/>
|
|
42
|
+
<xsd:element name="aceptarFECredResponse" type="tns:GenericResponseType"/>
|
|
43
|
+
</xsd:schema>
|
|
44
|
+
</wsdl:types>
|
|
45
|
+
<wsdl:message name="dummyRequest">
|
|
46
|
+
<wsdl:part element="tns:dummy" name="parameters"/>
|
|
47
|
+
</wsdl:message>
|
|
48
|
+
<wsdl:message name="dummyResponse">
|
|
49
|
+
<wsdl:part element="tns:dummyResponse" name="parameters"/>
|
|
50
|
+
</wsdl:message>
|
|
51
|
+
<wsdl:message name="consultarTiposRetencionesRequest"><wsdl:part element="tns:consultarTiposRetenciones" name="parameters"/></wsdl:message>
|
|
52
|
+
<wsdl:message name="consultarTiposRetencionesResponse"><wsdl:part element="tns:consultarTiposRetencionesResponse" name="parameters"/></wsdl:message>
|
|
53
|
+
<wsdl:message name="consultarTiposMotivosRechazoRequest"><wsdl:part element="tns:consultarTiposMotivosRechazo" name="parameters"/></wsdl:message>
|
|
54
|
+
<wsdl:message name="consultarTiposMotivosRechazoResponse"><wsdl:part element="tns:consultarTiposMotivosRechazoResponse" name="parameters"/></wsdl:message>
|
|
55
|
+
<wsdl:message name="consultarTiposFormasCancelacionRequest"><wsdl:part element="tns:consultarTiposFormasCancelacion" name="parameters"/></wsdl:message>
|
|
56
|
+
<wsdl:message name="consultarTiposFormasCancelacionResponse"><wsdl:part element="tns:consultarTiposFormasCancelacionResponse" name="parameters"/></wsdl:message>
|
|
57
|
+
<wsdl:message name="consultarCtaCteRequest"><wsdl:part element="tns:consultarCtaCte" name="parameters"/></wsdl:message>
|
|
58
|
+
<wsdl:message name="consultarCtaCteResponse"><wsdl:part element="tns:consultarCtaCteResponse" name="parameters"/></wsdl:message>
|
|
59
|
+
<wsdl:message name="consultarComprobantesRequest"><wsdl:part element="tns:consultarComprobantes" name="parameters"/></wsdl:message>
|
|
60
|
+
<wsdl:message name="consultarComprobantesResponse"><wsdl:part element="tns:consultarComprobantesResponse" name="parameters"/></wsdl:message>
|
|
61
|
+
<wsdl:message name="consultarCtasCtesRequest"><wsdl:part element="tns:consultarCtasCtes" name="parameters"/></wsdl:message>
|
|
62
|
+
<wsdl:message name="consultarCtasCtesResponse"><wsdl:part element="tns:consultarCtasCtesResponse" name="parameters"/></wsdl:message>
|
|
63
|
+
<wsdl:message name="aceptarFECredRequest"><wsdl:part element="tns:aceptarFECred" name="parameters"/></wsdl:message>
|
|
64
|
+
<wsdl:message name="aceptarFECredResponse"><wsdl:part element="tns:aceptarFECredResponse" name="parameters"/></wsdl:message>
|
|
65
|
+
<wsdl:portType name="FECredServicePortType">
|
|
66
|
+
<wsdl:operation name="dummy">
|
|
67
|
+
<wsdl:input message="tns:dummyRequest"/>
|
|
68
|
+
<wsdl:output message="tns:dummyResponse"/>
|
|
69
|
+
</wsdl:operation>
|
|
70
|
+
<wsdl:operation name="consultarTiposRetenciones">
|
|
71
|
+
<wsdl:input message="tns:consultarTiposRetencionesRequest"/>
|
|
72
|
+
<wsdl:output message="tns:consultarTiposRetencionesResponse"/>
|
|
73
|
+
</wsdl:operation>
|
|
74
|
+
<wsdl:operation name="consultarTiposMotivosRechazo">
|
|
75
|
+
<wsdl:input message="tns:consultarTiposMotivosRechazoRequest"/>
|
|
76
|
+
<wsdl:output message="tns:consultarTiposMotivosRechazoResponse"/>
|
|
77
|
+
</wsdl:operation>
|
|
78
|
+
<wsdl:operation name="consultarTiposFormasCancelacion">
|
|
79
|
+
<wsdl:input message="tns:consultarTiposFormasCancelacionRequest"/>
|
|
80
|
+
<wsdl:output message="tns:consultarTiposFormasCancelacionResponse"/>
|
|
81
|
+
</wsdl:operation>
|
|
82
|
+
<wsdl:operation name="consultarCtaCte">
|
|
83
|
+
<wsdl:input message="tns:consultarCtaCteRequest"/>
|
|
84
|
+
<wsdl:output message="tns:consultarCtaCteResponse"/>
|
|
85
|
+
</wsdl:operation>
|
|
86
|
+
<wsdl:operation name="consultarComprobantes">
|
|
87
|
+
<wsdl:input message="tns:consultarComprobantesRequest"/>
|
|
88
|
+
<wsdl:output message="tns:consultarComprobantesResponse"/>
|
|
89
|
+
</wsdl:operation>
|
|
90
|
+
<wsdl:operation name="consultarCtasCtes">
|
|
91
|
+
<wsdl:input message="tns:consultarCtasCtesRequest"/>
|
|
92
|
+
<wsdl:output message="tns:consultarCtasCtesResponse"/>
|
|
93
|
+
</wsdl:operation>
|
|
94
|
+
<wsdl:operation name="aceptarFECred">
|
|
95
|
+
<wsdl:input message="tns:aceptarFECredRequest"/>
|
|
96
|
+
<wsdl:output message="tns:aceptarFECredResponse"/>
|
|
97
|
+
</wsdl:operation>
|
|
98
|
+
</wsdl:portType>
|
|
99
|
+
<wsdl:binding name="FECredServiceSoap11Binding" type="tns:FECredServicePortType">
|
|
100
|
+
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
|
101
|
+
<wsdl:operation name="dummy">
|
|
102
|
+
<soap:operation soapAction="https://ar.gob.afip.wsfecred/FECredService/dummy"/>
|
|
103
|
+
<wsdl:input><soap:body use="literal"/></wsdl:input>
|
|
104
|
+
<wsdl:output><soap:body use="literal"/></wsdl:output>
|
|
105
|
+
</wsdl:operation>
|
|
106
|
+
<wsdl:operation name="consultarTiposRetenciones">
|
|
107
|
+
<soap:operation soapAction="https://ar.gob.afip.wsfecred/FECredService/consultarTiposRetenciones"/>
|
|
108
|
+
<wsdl:input><soap:body use="literal"/></wsdl:input>
|
|
109
|
+
<wsdl:output><soap:body use="literal"/></wsdl:output>
|
|
110
|
+
</wsdl:operation>
|
|
111
|
+
<wsdl:operation name="consultarTiposMotivosRechazo">
|
|
112
|
+
<soap:operation soapAction="https://ar.gob.afip.wsfecred/FECredService/consultarTiposMotivosRechazo"/>
|
|
113
|
+
<wsdl:input><soap:body use="literal"/></wsdl:input>
|
|
114
|
+
<wsdl:output><soap:body use="literal"/></wsdl:output>
|
|
115
|
+
</wsdl:operation>
|
|
116
|
+
<wsdl:operation name="consultarTiposFormasCancelacion">
|
|
117
|
+
<soap:operation soapAction="https://ar.gob.afip.wsfecred/FECredService/consultarTiposFormasCancelacion"/>
|
|
118
|
+
<wsdl:input><soap:body use="literal"/></wsdl:input>
|
|
119
|
+
<wsdl:output><soap:body use="literal"/></wsdl:output>
|
|
120
|
+
</wsdl:operation>
|
|
121
|
+
<wsdl:operation name="consultarCtaCte">
|
|
122
|
+
<soap:operation soapAction="https://ar.gob.afip.wsfecred/FECredService/consultarCtaCte"/>
|
|
123
|
+
<wsdl:input><soap:body use="literal"/></wsdl:input>
|
|
124
|
+
<wsdl:output><soap:body use="literal"/></wsdl:output>
|
|
125
|
+
</wsdl:operation>
|
|
126
|
+
<wsdl:operation name="consultarComprobantes">
|
|
127
|
+
<soap:operation soapAction="https://ar.gob.afip.wsfecred/FECredService/consultarComprobantes"/>
|
|
128
|
+
<wsdl:input><soap:body use="literal"/></wsdl:input>
|
|
129
|
+
<wsdl:output><soap:body use="literal"/></wsdl:output>
|
|
130
|
+
</wsdl:operation>
|
|
131
|
+
<wsdl:operation name="consultarCtasCtes">
|
|
132
|
+
<soap:operation soapAction="https://ar.gob.afip.wsfecred/FECredService/consultarCtasCtes"/>
|
|
133
|
+
<wsdl:input><soap:body use="literal"/></wsdl:input>
|
|
134
|
+
<wsdl:output><soap:body use="literal"/></wsdl:output>
|
|
135
|
+
</wsdl:operation>
|
|
136
|
+
<wsdl:operation name="aceptarFECred">
|
|
137
|
+
<soap:operation soapAction="https://ar.gob.afip.wsfecred/FECredService/aceptarFECred"/>
|
|
138
|
+
<wsdl:input><soap:body use="literal"/></wsdl:input>
|
|
139
|
+
<wsdl:output><soap:body use="literal"/></wsdl:output>
|
|
140
|
+
</wsdl:operation>
|
|
141
|
+
</wsdl:binding>
|
|
142
|
+
<wsdl:service name="FECredService">
|
|
143
|
+
<wsdl:port binding="tns:FECredServiceSoap11Binding" name="FECredServiceHttpSoap11Endpoint">
|
|
144
|
+
<soap:address location="https://fwshomo.afip.gov.ar/wsfecred/FECredService"/>
|
|
145
|
+
</wsdl:port>
|
|
146
|
+
</wsdl:service>
|
|
147
|
+
</wsdl:definitions>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
|
2
|
+
<soap:Body>
|
|
3
|
+
<ns2:consultarConstanciaPorLote_v2Response xmlns:ns2="http://impl.service.wsrgiva.afip.gov.ar/RegimenPercepcionIVAService/">
|
|
4
|
+
<return>
|
|
5
|
+
<constancia>
|
|
6
|
+
<fechaConsulta>23-03-2023</fechaConsulta>
|
|
7
|
+
<idContribuyente>30636414936</idContribuyente>
|
|
8
|
+
<codigoError>4003</codigoError>
|
|
9
|
+
<descripcionError>CUIT Inexistente</descripcionError>
|
|
10
|
+
</constancia>
|
|
11
|
+
</return>
|
|
12
|
+
</ns2:consultarConstanciaPorLote_v2Response>
|
|
13
|
+
</soap:Body>
|
|
14
|
+
</soap:Envelope>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
|
2
|
+
<soap:Body>
|
|
3
|
+
<ns2:consultarConstanciaPorLote_v2Response xmlns:ns2="http://impl.service.wsrgiva.afip.gov.ar/RegimenPercepcionIVAService/">
|
|
4
|
+
<return>
|
|
5
|
+
<constancia>
|
|
6
|
+
<fechaConsulta>23-03-2023</fechaConsulta>
|
|
7
|
+
<idContribuyente>20123456789</idContribuyente>
|
|
8
|
+
<descripcionContribuyente>RAZON SOCIAL EJEMPLO S.A.</descripcionContribuyente>
|
|
9
|
+
<vigencia>23-09-2023</vigencia>
|
|
10
|
+
<codigoLeyenda>18</codigoLeyenda>
|
|
11
|
+
<descripcionLeyenda>Alícuota 1% - Responsables inscriptos, sin incumplimientos.</descripcionLeyenda>
|
|
12
|
+
<codigoSeguridad>ABC123</codigoSeguridad>
|
|
13
|
+
</constancia>
|
|
14
|
+
<constancia>
|
|
15
|
+
<fechaConsulta>23-03-2023</fechaConsulta>
|
|
16
|
+
<idContribuyente>20234567890</idContribuyente>
|
|
17
|
+
<descripcionContribuyente>OTRA RAZON S.R.L.</descripcionContribuyente>
|
|
18
|
+
<vigencia>23-09-2023</vigencia>
|
|
19
|
+
<codigoLeyenda>2</codigoLeyenda>
|
|
20
|
+
<descripcionLeyenda>Alícuota 0% - Sujeto Exento o No Alcanzado en IVA</descripcionLeyenda>
|
|
21
|
+
<codigoSeguridad>XYZ789</codigoSeguridad>
|
|
22
|
+
</constancia>
|
|
23
|
+
</return>
|
|
24
|
+
</ns2:consultarConstanciaPorLote_v2Response>
|
|
25
|
+
</soap:Body>
|
|
26
|
+
</soap:Envelope>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
|
2
|
+
<soap:Body>
|
|
3
|
+
<ns2:dummyResponse xmlns:ns2="http://impl.service.wsrgiva.afip.gov.ar/RegimenPercepcionIVAService/">
|
|
4
|
+
<return>
|
|
5
|
+
<appserver>OK</appserver>
|
|
6
|
+
<authserver>OK</authserver>
|
|
7
|
+
<dbserver>OK</dbserver>
|
|
8
|
+
</return>
|
|
9
|
+
</ns2:dummyResponse>
|
|
10
|
+
</soap:Body>
|
|
11
|
+
</soap:Envelope>
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
|
3
|
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
|
4
|
+
xmlns:tns="http://impl.service.wsrgiva.afip.gov.ar/RegimenPercepcionIVAService/"
|
|
5
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
6
|
+
name="RegimenPercepcionIVAService"
|
|
7
|
+
targetNamespace="http://impl.service.wsrgiva.afip.gov.ar/RegimenPercepcionIVAService/">
|
|
8
|
+
<wsdl:types>
|
|
9
|
+
<xsd:schema targetNamespace="http://impl.service.wsrgiva.afip.gov.ar/RegimenPercepcionIVAService/">
|
|
10
|
+
<xsd:element name="dummy" type="tns:DummyType"/>
|
|
11
|
+
<xsd:element name="dummyResponse" type="tns:DummyResponseType"/>
|
|
12
|
+
<xsd:complexType name="DummyType">
|
|
13
|
+
<xsd:sequence/>
|
|
14
|
+
</xsd:complexType>
|
|
15
|
+
<xsd:complexType name="DummyResponseType">
|
|
16
|
+
<xsd:sequence>
|
|
17
|
+
<xsd:element name="return" type="tns:DummyReturnType"/>
|
|
18
|
+
</xsd:sequence>
|
|
19
|
+
</xsd:complexType>
|
|
20
|
+
<xsd:complexType name="DummyReturnType">
|
|
21
|
+
<xsd:sequence>
|
|
22
|
+
<xsd:element name="appserver" type="xsd:string"/>
|
|
23
|
+
<xsd:element name="authserver" type="xsd:string"/>
|
|
24
|
+
<xsd:element name="dbserver" type="xsd:string"/>
|
|
25
|
+
</xsd:sequence>
|
|
26
|
+
</xsd:complexType>
|
|
27
|
+
<xsd:complexType name="AuthRequestType">
|
|
28
|
+
<xsd:sequence>
|
|
29
|
+
<xsd:element name="token" type="xsd:string"/>
|
|
30
|
+
<xsd:element name="sign" type="xsd:string"/>
|
|
31
|
+
<xsd:element name="cuitRepresentada" type="xsd:long"/>
|
|
32
|
+
</xsd:sequence>
|
|
33
|
+
</xsd:complexType>
|
|
34
|
+
<xsd:element name="consultarConstanciaPorLote_v2Request" type="tns:ConsultarConstanciaPorLoteRequestType_v2"/>
|
|
35
|
+
<xsd:element name="consultarConstanciaPorLote_v2Response" type="tns:ConsultarConstanciaPorLoteResponseType"/>
|
|
36
|
+
<xsd:complexType name="ConsultarConstanciaPorLoteRequestType_v2">
|
|
37
|
+
<xsd:sequence>
|
|
38
|
+
<xsd:element name="authRequest" type="tns:AuthRequestType"/>
|
|
39
|
+
<xsd:element name="datosTransaccionArray" type="tns:DatosTransaccionArrayType"/>
|
|
40
|
+
</xsd:sequence>
|
|
41
|
+
</xsd:complexType>
|
|
42
|
+
<xsd:complexType name="ConsultarConstanciaPorLoteResponseType">
|
|
43
|
+
<xsd:sequence>
|
|
44
|
+
<xsd:element name="return" type="tns:ConstanciaArrayType"/>
|
|
45
|
+
</xsd:sequence>
|
|
46
|
+
</xsd:complexType>
|
|
47
|
+
<xsd:complexType name="ConstanciaArrayType">
|
|
48
|
+
<xsd:sequence>
|
|
49
|
+
<xsd:element maxOccurs="100" minOccurs="0" name="constancia" type="tns:ConstanciaType"/>
|
|
50
|
+
</xsd:sequence>
|
|
51
|
+
</xsd:complexType>
|
|
52
|
+
<xsd:complexType name="ConstanciaType">
|
|
53
|
+
<xsd:sequence>
|
|
54
|
+
<xsd:element name="fechaConsulta" type="xsd:string"/>
|
|
55
|
+
<xsd:element name="idContribuyente" type="xsd:long"/>
|
|
56
|
+
<xsd:element minOccurs="0" name="descripcionContribuyente" type="xsd:string"/>
|
|
57
|
+
<xsd:element minOccurs="0" name="vigencia" type="xsd:string"/>
|
|
58
|
+
<xsd:element minOccurs="0" name="codigoLeyenda" type="xsd:int"/>
|
|
59
|
+
<xsd:element minOccurs="0" name="descripcionLeyenda" type="xsd:string"/>
|
|
60
|
+
<xsd:element minOccurs="0" name="codigoSeguridad" type="xsd:string"/>
|
|
61
|
+
<xsd:element minOccurs="0" name="codigoError" type="xsd:int"/>
|
|
62
|
+
<xsd:element minOccurs="0" name="descripcionError" type="xsd:string"/>
|
|
63
|
+
</xsd:sequence>
|
|
64
|
+
</xsd:complexType>
|
|
65
|
+
<xsd:complexType name="DatosTransaccionArrayType">
|
|
66
|
+
<xsd:sequence>
|
|
67
|
+
<xsd:element maxOccurs="100" minOccurs="0" name="datosTransaccion" type="tns:DatosTransaccionType"/>
|
|
68
|
+
</xsd:sequence>
|
|
69
|
+
</xsd:complexType>
|
|
70
|
+
<xsd:complexType name="DatosTransaccionType">
|
|
71
|
+
<xsd:sequence>
|
|
72
|
+
<xsd:element name="cuitContribuyente" type="xsd:long"/>
|
|
73
|
+
<xsd:element name="tipoBienesInvolucrados" type="xsd:unsignedByte"/>
|
|
74
|
+
</xsd:sequence>
|
|
75
|
+
</xsd:complexType>
|
|
76
|
+
</xsd:schema>
|
|
77
|
+
</wsdl:types>
|
|
78
|
+
<wsdl:message name="dummyRequest">
|
|
79
|
+
<wsdl:part element="tns:dummy" name="parameters"/>
|
|
80
|
+
</wsdl:message>
|
|
81
|
+
<wsdl:message name="dummyResponse">
|
|
82
|
+
<wsdl:part element="tns:dummyResponse" name="parameters"/>
|
|
83
|
+
</wsdl:message>
|
|
84
|
+
<wsdl:message name="consultarConstanciaPorLote_v2Request">
|
|
85
|
+
<wsdl:part element="tns:consultarConstanciaPorLote_v2Request" name="parameters"/>
|
|
86
|
+
</wsdl:message>
|
|
87
|
+
<wsdl:message name="consultarConstanciaPorLote_v2Response">
|
|
88
|
+
<wsdl:part element="tns:consultarConstanciaPorLote_v2Response" name="parameters"/>
|
|
89
|
+
</wsdl:message>
|
|
90
|
+
<wsdl:portType name="RegimenPercepcionIVAServicePortType_v2">
|
|
91
|
+
<wsdl:operation name="dummy">
|
|
92
|
+
<wsdl:input message="tns:dummyRequest"/>
|
|
93
|
+
<wsdl:output message="tns:dummyResponse"/>
|
|
94
|
+
</wsdl:operation>
|
|
95
|
+
<wsdl:operation name="consultarConstanciaPorLote_v2">
|
|
96
|
+
<wsdl:input message="tns:consultarConstanciaPorLote_v2Request"/>
|
|
97
|
+
<wsdl:output message="tns:consultarConstanciaPorLote_v2Response"/>
|
|
98
|
+
</wsdl:operation>
|
|
99
|
+
</wsdl:portType>
|
|
100
|
+
<wsdl:binding name="RegimenPercepcionIVAServiceSoap11Binding" type="tns:RegimenPercepcionIVAServicePortType_v2">
|
|
101
|
+
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
|
102
|
+
<wsdl:operation name="dummy">
|
|
103
|
+
<soap:operation soapAction="http://impl.service.wsrgiva.afip.gov.ar/RegimenPercepcionIVAService/dummy"/>
|
|
104
|
+
<wsdl:input><soap:body use="literal"/></wsdl:input>
|
|
105
|
+
<wsdl:output><soap:body use="literal"/></wsdl:output>
|
|
106
|
+
</wsdl:operation>
|
|
107
|
+
<wsdl:operation name="consultarConstanciaPorLote_v2">
|
|
108
|
+
<soap:operation soapAction="http://impl.service.wsrgiva.afip.gov.ar/RegimenPercepcionIVAService/consultarConstanciaPorLote_v2"/>
|
|
109
|
+
<wsdl:input><soap:body use="literal"/></wsdl:input>
|
|
110
|
+
<wsdl:output><soap:body use="literal"/></wsdl:output>
|
|
111
|
+
</wsdl:operation>
|
|
112
|
+
</wsdl:binding>
|
|
113
|
+
<wsdl:service name="RegimenPercepcionIVAService_v2.0">
|
|
114
|
+
<wsdl:port binding="tns:RegimenPercepcionIVAServiceSoap11Binding" name="RegimenPercepcionIVAServiceHttpSoap11Endpoint">
|
|
115
|
+
<soap:address location="https://fwshomo.afip.gov.ar/wsrgiva/services/RegimenPercepcionIVAService"/>
|
|
116
|
+
</wsdl:port>
|
|
117
|
+
</wsdl:service>
|
|
118
|
+
</wsdl:definitions>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Savon 2 only verifies message params as a hash. This allows passing xpaths for verification.
|
|
4
|
+
|
|
5
|
+
module Savon
|
|
6
|
+
module MessageMatcher
|
|
7
|
+
def actual(operation_name, builder, globals, locals)
|
|
8
|
+
super.update request: builder.to_s
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def verify_message!
|
|
12
|
+
if @expected[:message].respond_to? :verify!
|
|
13
|
+
@expected[:message].verify! @actual[:request]
|
|
14
|
+
else
|
|
15
|
+
super
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
MockExpectation.prepend MessageMatcher
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def has_path(paths)
|
|
24
|
+
HasXPath.new(paths)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
class HasXPath
|
|
28
|
+
def initialize(paths)
|
|
29
|
+
@paths = paths
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def verify!(xml)
|
|
33
|
+
doc = Nokogiri::XML(xml)
|
|
34
|
+
doc.remove_namespaces!
|
|
35
|
+
@paths.each do |path, expected_value|
|
|
36
|
+
actual = doc.xpath(path).text
|
|
37
|
+
unless actual == expected_value.to_s
|
|
38
|
+
raise Minitest::Assertion,
|
|
39
|
+
"expected xpath '#{path}' with value '#{expected_value}', got: #{actual.inspect}\n#{doc}"
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
data/test/test_helper.rb
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "minitest/autorun"
|
|
4
|
+
require "arca"
|
|
5
|
+
require "savon/mock/spec_helper"
|
|
6
|
+
require "mocha/minitest"
|
|
7
|
+
|
|
8
|
+
Dir[File.expand_path("support/**/*.rb", __dir__)].each { |f| require f }
|
|
9
|
+
|
|
10
|
+
module Arca
|
|
11
|
+
class TestCase < Minitest::Test
|
|
12
|
+
include Savon::SpecHelper
|
|
13
|
+
|
|
14
|
+
def setup
|
|
15
|
+
savon.mock!
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def teardown
|
|
19
|
+
savon.unmock!
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def fixture(file)
|
|
25
|
+
File.read("#{Arca::Root}/test/fixtures/#{file}.xml")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def assert_hash_includes(actual, expected)
|
|
29
|
+
expected.each do |k, v|
|
|
30
|
+
if v.nil?
|
|
31
|
+
assert_nil actual[k], "expected key :#{k} to be nil"
|
|
32
|
+
else
|
|
33
|
+
assert_equal v, actual[k], "expected key :#{k}"
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def assert_xpath(xml, xpath, expected_value)
|
|
39
|
+
doc = Nokogiri::XML(xml)
|
|
40
|
+
doc.remove_namespaces!
|
|
41
|
+
actual = doc.xpath(xpath).text
|
|
42
|
+
assert_equal expected_value.to_s, actual,
|
|
43
|
+
"expected xpath '#{xpath}' to have value '#{expected_value}', got: #{actual.inspect}\n#{doc}"
|
|
44
|
+
end
|