Sha256: ded49f2c6c4ae783fa27fffafd425550b91e4c6dc3dcba1bd082cd9a35f44fb9

Contents?: true

Size: 563 Bytes

Versions: 9

Compression:

Stored size: 563 Bytes

Contents

require 'spec_helper'

describe Paypal::IPN do
  describe '.verify!' do
    context 'when valid' do
      before do
        fake_response 'IPN/valid', :IPN
      end

      it 'should return true' do
        Paypal::IPN.verify!("raw-post-body").should be_true
      end
    end

    context 'when invalid' do
      before do
        fake_response 'IPN/invalid', :IPN
      end

      it 'should raise Paypal::APIError' do
        lambda do
          Paypal::IPN.verify!("raw-post-body")
        end.should raise_error(Paypal::APIError)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
paypal-express-0.1.0 spec/paypal/ipn_spec.rb
paypal-express-0.0.9 spec/paypal/ipn_spec.rb
paypal-express-0.0.8 spec/paypal/ipn_spec.rb
paypal-express-0.0.7 spec/paypal/ipn_spec.rb
paypal-express-0.0.6 spec/paypal/ipn_spec.rb
paypal-express-0.0.5 spec/paypal/ipn_spec.rb
paypal-express-0.0.4 spec/paypal/ipn_spec.rb
paypal-express-0.0.3 spec/paypal/ipn_spec.rb
paypal-express-0.0.2 spec/paypal/ipn_spec.rb