You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: credit_card_test.rb
    path of file: ./repos/workarea/core/test/models/workarea/payment/authorize
    
    the code of the file until where you have to start completion: require 'test_helper'

module Workarea
  class Payment
    module Authorize
      class CreditCardTest < Workarea::TestCase
        def test_complete_does_nothing_if_gateway_storage_fails
          operation = Payment::Authorize::CreditCard.new(tender, transaction)

          StoreCreditCard.any_instance.stubs(:save!).returns(false
    
        def test_cancel_sets_cancellation_params_on_the_transaction
          transaction.response = ActiveMerchant::Billing::Response.new(
            true,
            'Message',
            {},
            { authorization: authorization }
          )

          operation = Payment::Authorize::CreditCard.new(tender, transaction)
          operation.cancel!

          assert_instance_of(
            ActiveMerchant::Billing::Response,
            transaction.cancellation
          )
        end