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: collect_payment_test.rb
    path of file: ./repos/workarea/core/test/models/workarea/checkout
    
    the code of the file until where you have to start completion: require 'test_helper'

module Workarea
  class Checkout
    class CollectPaymentTest < TestCase
      def order
        @order ||= Order.new(email: 'test@workarea.com', total_price: 5.to_m)
      end

      def checkout
        @checkout 
    
      def test_purchase
        refute(collect_payment.purchase)

        order.total_price = 0.to_m
        assert(collect_payment.purchase)

        order.total_price = 5.to_m

        checkout.payment.profile = create_payment_profile(
          email: order.email,
          store_credit: 20.to_m
        )
        checkout.payment.build_store_credit(amount: 5.to_m)

        assert(collect_payment.purchase)
      end