Payeezy v0.1.0 Payeezy.TestHelpers

Summary

Functions

build_bypass()
build_bypass() :: any

Creates a Bypass listener to act as a double for the actual Payeezy GiftCard API endpoint

purchase_failure_insufficient_funds(purchase_amount)
purchase_failure_missing_cc_response_string()
purchase_failure_missing_cc_response_string() :: String.t
simulate_balance_inquiry_and_purchase_insufficient_funds(bypass, balance)
simulate_balance_inquiry_and_purchase_insufficient_funds(any, String.t) :: no_return
simulate_balance_inquiry_and_purchase_success(bypass, balance)
simulate_balance_inquiry_and_purchase_success(any, String.t) :: no_return
simulate_service_down(bypass)
simulate_service_down(any) :: nil

Simulates that the provided Bypass listener is not accepting connections

simulate_service_response(bypass, status, body, fun)
simulate_service_response(any, Plug.Conn.status, String.t, (Plug.Conn.t -> boolean)) :: no_return
successful_balance_inquiry_response_string(current_balance)
successful_balance_inquiry_response_string(String.t) :: String.t
successful_purchase_response_string(purchase_amount, current_balance, previous_balance)
successful_purchase_response_string(String.t, String.t, String.t) :: String.t
successful_refund_response_string(refund_amount)
successful_refund_response_string(String.t) :: String.t
successful_void_response_string(void_amount)