spec/integration/models/credit_card_spec.rb in transactionable-0.2.0 vs spec/integration/models/credit_card_spec.rb in transactionable-0.3.0
- old
+ new
@@ -14,15 +14,17 @@
before do
setup_user_with_credit_card
@credit_card = @user.credit_cards.first
@credit_card.debit!(13.37)
@transaction = @credit_card.transactions.first
+ @user.log_transaction(@transaction)
@remote_transaction = @transaction.remote
end
specify { @credit_card.debits.should_not be_blank }
specify { @credit_card.debits.first.should eql @transaction }
specify { @transaction.should be_instance_of Transactionable::Debit }
+ specify { @user.transactions.should include(@transaction) }
specify { @remote_transaction.should be_instance_of Balanced::Debit }
specify { (@transaction.amount*100).should eql @remote_transaction.amount }
end
end
\ No newline at end of file