Sha256: fa6e4551ac1e9a87bd3d773ab6977e6e90ab9e2e6896e9d832b31cf4385e72d4

Contents?: true

Size: 879 Bytes

Versions: 10

Compression:

Stored size: 879 Bytes

Contents

describe MangoPay::Temp::PaymentCard do
  include_context 'users'

  def new_temp_paymentcard
    MangoPay::Temp::PaymentCard.create({
      Tag: 'Test temp payment card',
      UserId: new_natural_user['Id'],
      Culture: 'FR',
      ReturnURL: 'https://mysite.com/return',
      TemplateURL: 'https://mysite.com/template'
    })
  end

  describe 'CREATE' do
    it 'creates a temp payment card' do
      created = new_temp_paymentcard
      expect(created['Id']).to_not be_nil
      expect(created['UserId']).to eq(new_natural_user['Id'])
    end
  end

  describe 'FETCH' do
    it 'fetches a temp payment card' do
      created = new_temp_paymentcard
      fetched = MangoPay::Temp::PaymentCard.fetch(created['Id'])
      expect(fetched['Id']).to eq(created['Id'])
      expect(fetched['UserId']).to eq(created['UserId'])
    end
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mangopay-3.0.25 spec/mangopay/temp_paymentcard_spec.rb
mangopay-3.0.23 spec/mangopay/temp_paymentcard_spec.rb
mangopay-3.0.21 spec/mangopay/temp_paymentcard_spec.rb
mangopay-3.0.20 spec/mangopay/temp_paymentcard_spec.rb
mangopay-3.0.19 spec/mangopay/temp_paymentcard_spec.rb
mangopay-3.0.18 spec/mangopay/temp_paymentcard_spec.rb
mangopay-3.0.17 spec/mangopay/temp_paymentcard_spec.rb
mangopay-3.0.16 spec/mangopay/temp_paymentcard_spec.rb
mangopay-3.0.15 spec/mangopay/temp_paymentcard_spec.rb
mangopay-3.0.14 spec/mangopay/temp_paymentcard_spec.rb