Sha256: cfb3d846c6970b0dca0b933f74c58ef0fe5a7687a71675e1f70cc80360347732

Contents?: true

Size: 502 Bytes

Versions: 2

Compression:

Stored size: 502 Bytes

Contents

# -*- encoding : utf-8 -*-
require 'spec_helper.rb'

describe OpenPayU::Models::Refund do
  context 'create valid refund' do
    let(:refund) do
      OpenPayU::Models::Refund.new({
        order_id: 1,
        description: 'Refund',
        amount: 1000
      })
    end
    it { refund.valid?.should be_true }
  end

  context 'create invalid refund' do
    let(:refund) do
      OpenPayU::Models::Refund.new({
        amount: 1000
      })
    end
    it { refund.valid?.should be_false }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
openpayu-0.1.2 spec/unit/models/refund_spec.rb
openpayu-0.0.2 spec/unit/models/refund_spec.rb