spec/resources/charge_spec.rb in paysio-1.0.4 vs spec/resources/charge_spec.rb in paysio-1.0.5

- old
+ new

@@ -8,6 +8,24 @@ client.expects(:post).once.returns(test_response(test_charge)) c = Paysio::Charge.create c.should be_a_kind_of(Paysio::Charge) end + + it "should be refundable" do + client = authorized_paysio_client + + client.expects(:get).once.returns(test_response(test_charge)) + client.expects(:post).once.returns(test_response(test_charge)) + c = Paysio::Charge.retrieve('test_id') + c.refund + end + + it "should have an invoice" do + client = authorized_paysio_client + + client.expects(:get).twice.returns(test_response(test_charge)) + c = Paysio::Charge.retrieve('test_id') + invoice = c.invoice + invoice.should be_a_kind_of(Paysio::Charge) + end end \ No newline at end of file