Sha256: 755b7475d823e01141926f81363a803bb460083283238d2f6bf215fee00c47c7
Contents?: true
Size: 1.09 KB
Versions: 2
Compression:
Stored size: 1.09 KB
Contents
require File.join(File.dirname(__FILE__), "..", "helper") class TestSoapEnvelope < Test::Unit::TestCase context "Calling soap_envelope" do setup { ApricotEatsGorilla.sort_keys = true } context "without parameter and block" do should "returns a SOAP envelope without body content" do expected = '<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">' << '<env:Body></env:Body></env:Envelope>' result = ApricotEatsGorilla.soap_envelope assert_equal expected, result end end context "with a Hash containing a custom namespace and a block" do should "returns a SOAP envelope with custom namespace and body content" do expected = '<env:Envelope ' << 'xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" ' << 'xmlns:wsdl="http://example.com">' << '<env:Body><id>123</id></env:Body></env:Envelope>' result = ApricotEatsGorilla.soap_envelope "wsdl" => "http://example.com" do "<id>123</id>" end assert_equal expected, result end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
smacks-apricoteatsgorilla-0.4.4 | test/apricoteatsgorilla/test_soap_envelope.rb |
smacks-apricoteatsgorilla-0.4.5 | test/apricoteatsgorilla/test_soap_envelope.rb |