Sha256: 07e123a570e63c125ec7d01378609833fcaa05c7c5710bff21d7bcfae007784e
Contents?: true
Size: 653 Bytes
Versions: 10
Compression:
Stored size: 653 Bytes
Contents
require 'spec_helper' RSpec.describe SolidusBolt::PaymentDecorator do describe '#can_void?' do [ 'checkout', 'completed', 'processing', 'failed', 'void', 'invalid' ].each do |state| let(:payment) { Spree::Payment.new(state: state) } context "when payment state is #{state}" do it 'return false' do expect(payment.can_void?).to eq false end end end context "when payment state is pending" do let(:payment) { Spree::Payment.new(state: 'pending') } it 'return true' do expect(payment.can_void?).to eq true end end end end
Version data entries
10 entries across 10 versions & 1 rubygems