spec/api/payment_service_spec.rb in adyen-1.3.0 vs spec/api/payment_service_spec.rb in adyen-1.3.1

- old
+ new

@@ -19,10 +19,11 @@ it "includes the shopper’s details" do text('./payment:shopperReference').should == 'user-id' text('./payment:shopperEmail').should == 's.hopper@example.com' text('./payment:shopperIP').should == '61.294.12.12' + text('./payment:shopperStatement').should == 'invoice number 123456' end it "only includes shopper details for given parameters" do # TODO pretty lame, but for now it will do unless @method == "authorise_one_click_payment_request_body" || @method == "authorise_recurring_payment_request_body" @@ -30,20 +31,23 @@ xpath('./payment:shopperReference').should be_empty @payment.params[:shopper].delete(:email) xpath('./payment:shopperEmail').should be_empty @payment.params[:shopper].delete(:ip) xpath('./payment:shopperIP').should be_empty + @payment.params[:shopper].delete(:statement) + xpath('./payment:shopperStatement').should be_empty end end it "does not include any shopper details if none are given" do # TODO pretty lame, but for now it will do unless @method == "authorise_one_click_payment_request_body" || @method == "authorise_recurring_payment_request_body" @payment.params.delete(:shopper) xpath('./payment:shopperReference').should be_empty xpath('./payment:shopperEmail').should be_empty xpath('./payment:shopperIP').should be_empty + xpath('./payment:statement').should be_empty end end end shared_examples_for "recurring payment requests" do @@ -67,9 +71,10 @@ }, :shopper => { :email => 's.hopper@example.com', :reference => 'user-id', :ip => '61.294.12.12', + :statement => 'invoice number 123456', }, :card => { :expiry_month => 12, :expiry_year => 2012, :holder_name => 'Simon わくわく Hopper',