Sha256: e7803a5b50ed759c88f73b360b6bcdf9ca347f4f53999b9125b75af0a25c6f75
Contents?: true
Size: 742 Bytes
Versions: 9
Compression:
Stored size: 742 Bytes
Contents
require "spec_helper" describe Spree::WebMoneyDecorator, type: :model do context 'when source is webmoney' do it 'delegates methods' do source = Spree::WebMoney.new(prepaid_cards: [], short_amount: 1000, payment_uuid: "123") decorator = Spree::WebMoneyDecorator.new(source) expect(decorator.prepaid_cards).to eq([]) expect(decorator.payment_uuid).to eq("123") expect(decorator.short_amount).to eq(1000) end end context 'when source is nill' do it 'delegates methods to nil' do decorator = Spree::WebMoneyDecorator.new(nil) expect(decorator.prepaid_cards).to be_nil expect(decorator.payment_uuid).to be_nil expect(decorator.short_amount).to be_nil end end end
Version data entries
9 entries across 9 versions & 1 rubygems