Created
July 29, 2009 18:20
-
-
Save supriya/158315 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in callhandlerv1#top_up_card | |
return result.fail_with("Credit Account is frozen") if @card.credit_account.frozen_credit? | |
in call_handler_top_up_test | |
context "with frozen credit" do | |
setup do | |
@card.credit_account.freeze_credit! | |
@result = CallHandler.top_up_card(:version => :v1, :account_number => @card_with_topup.pan, :transaction_amount => @transaction_amount, :available_balance => 488.00, :ip_address => "127.0.0.01") | |
end | |
should "fail" do | |
assert_equal false, @result.success? | |
end | |
should_change "CallHandlerLogEntry.unsuccessful.for_method('top_up_card').count", :by =>1 | |
should_not_change "CardTopUpTransaction.count" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment