Sha256: eeb68a2e7a36ccb09af8945e164afa51d43cb3425359dadcb533a56e483c560c

Contents?: true

Size: 482 Bytes

Versions: 23

Compression:

Stored size: 482 Bytes

Contents

require 'spec_helper'

describe Paypal::IPN do
  describe '.verify!' do
    context 'when valid' do
      before { fake_response 'IPN/valid', :IPN }
      subject { Paypal::IPN.verify!('raw-post-body') }
      it { should be_true }
    end

    context 'when invalid' do
      before { fake_response 'IPN/invalid', :IPN }
      subject {}
      it do
        expect { Paypal::IPN.verify!('raw-post-body') }.should raise_error(Paypal::Exception::APIError)
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
paypal-express-0.5.0 spec/paypal/ipn_spec.rb
paypal-express-0.4.7 spec/paypal/ipn_spec.rb
paypal-express-0.5.0.alpha spec/paypal/ipn_spec.rb
paypal-express-0.4.6 spec/paypal/ipn_spec.rb
paypal-express-0.4.5 spec/paypal/ipn_spec.rb
paypal-express-0.4.4 spec/paypal/ipn_spec.rb
paypal-express-0.4.3 spec/paypal/ipn_spec.rb
paypal-express-0.4.2 spec/paypal/ipn_spec.rb
paypal-express-0.4.1 spec/paypal/ipn_spec.rb
paypal-express-0.4.0 spec/paypal/ipn_spec.rb
paypal-express-0.4.0.alpha spec/paypal/ipn_spec.rb
paypal-express-0.3.1 spec/paypal/ipn_spec.rb
paypal-express-0.3.0 spec/paypal/ipn_spec.rb
paypal-express-0.2.10 spec/paypal/ipn_spec.rb
paypal-express-0.2.9 spec/paypal/ipn_spec.rb
paypal-express-0.2.8 spec/paypal/ipn_spec.rb
paypal-express-0.2.7 spec/paypal/ipn_spec.rb
paypal-express-0.2.6 spec/paypal/ipn_spec.rb
paypal-express-0.2.5 spec/paypal/ipn_spec.rb
paypal-express-0.2.4 spec/paypal/ipn_spec.rb