Skip to content

Instantly share code, notes, and snippets.

@kenton
Created October 2, 2012 17:59
Show Gist options
  • Save kenton/3821746 to your computer and use it in GitHub Desktop.
Save kenton/3821746 to your computer and use it in GitHub Desktop.
test 'A Lead based ad hoc charge should be applied to the selected credit card if admin selects a specific card on file with the operator' do
Operator.transaction do
operator = Operator.find(1)
cpm = operator.card_payment_methods.first
mes_response = BillingOperations.charge_single_operator(:operator_id => operator.id,
:amount => 42.42,
:is_initial_account_load => false,
:is_subscription => false,
:card_payment_method_id => cpm.id)
assert_equal mes_response.masked_card_number, cpm.masked_card_digits
assert_equal mes_response.card_exp_date, cpm.shortened_expiration_date.gsub("/", "")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment