Sha256: 22943d831f2f1d66c3b7a8727e308a013e00bb29c5998808c21f464aa73513a2

Contents?: true

Size: 999 Bytes

Versions: 1

Compression:

Stored size: 999 Bytes

Contents

require "#{File.dirname(__FILE__)}/spec_helper.rb"

describe Adyen::SOAP::RecurringService do
  
  before(:each) do
    
    response_xml = <<-EOS
      <?xml version="1.0" encoding="UTF-8" ?>
      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
         xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
         
         <soap:Body>
         </soap:Body>
      </soap:Envelope>
    EOS

    @response = mock('Handsoap::HTTP::Response')
    @part     = mock('Handsoap::HTTP::Part')
    @part.stub!(:body).and_return(response_xml)
    
    @response.stub!(:status).and_return(200)
    @response.stub!(:primary_part).and_return(@part)
    Adyen::SOAP::RecurringService.instance.stub!(:send_http_request).and_return(@response)
  end
  
  it "should send an HTTP request" do
    Adyen::SOAP::RecurringService.instance.should_receive(:send_http_request).and_return(@response)
    Adyen::SOAP::RecurringService.submit()
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
adyen-0.1.4 spec/soap_spec.rb