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 = '' <<
''
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 = '' <<
'123'
result = ApricotEatsGorilla.soap_envelope "wsdl" => "http://example.com" do
"123"
end
assert_equal expected, result
end
end
end
end