Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/providers/omniva_provider_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_sends_normalized_e_invoice
.to_return(status: 200, body: response_body)

main_request = stub_request(:post, 'https://provider.test/endpoint')
.with(body: main_request_body)
.with(body: main_request_body_pattern)
.to_return(status: 200, body: '')

provider = EInvoice::Providers::OmnivaProvider.new(wsdl_production: 'https://provider.test/wsdl.xml',
Expand All @@ -49,7 +49,7 @@ def test_uses_production_wsdl_when_test_mode_is_off

private

def main_request_body
'<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://e-arvetekeskus.eu/erp" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch1="http://www.pangaliit.ee/arveldused/e-arve/" xmlns:sch0="http://e-arvetekeskus.eu/erp" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"><env:Body><tns:EInvoiceRequest authPhrase="test-password"><E_Invoice/></tns:EInvoiceRequest></env:Body></env:Envelope>'
def main_request_body_pattern
%r{<env:Body><tns:EInvoiceRequest authPhrase="test-password"><E_Invoice/></tns:EInvoiceRequest></env:Body>}
end
end
Loading