spec/balanced/resources/debit_spec.rb in balanced-1.0.1 vs spec/balanced/resources/debit_spec.rb in balanced-1.0.2
- old
+ new
@@ -59,24 +59,29 @@
end
end
describe '#refund', :vcr do
+ before do
+ @meta = {"order_id" => "11111"}
+ end
subject do
debit = Balanced::Debit.new(
:amount => 1234,
:source => {
:number => '5105105105105100',
:expiration_month => '12',
:expiration_year => '2015'
- })
+ },
+ :meta => @meta)
debit.save
- refund = debit.refund
+ refund = debit.refund({:meta => @meta})
refund
end
it { should_not be_nil }
it { should be_instance_of Balanced::Refund }
its(:amount) { should eql 1234 }
+ its(:meta) {should eq @meta}
end
end