Sha256: 9a849c24f1bd2d3cb7436877fe3a66807511e9b315332ed8bdc5982bf91a1b20
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 with an empty element body tag" do expected = '<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">' << '<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 a 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.6 | test/apricoteatsgorilla/test_soap_envelope.rb |
smacks-apricoteatsgorilla-0.4.7 | test/apricoteatsgorilla/test_soap_envelope.rb |