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
    
    the code of the file until where you have to start completion: require 'test_helper'

module Workarea
  class Payment
    class CreditCardTest < TestCase
      class CreditCardModel
        include Mongoid::Document
        include CreditCard

        field :first_name, type: String
        field :last_name, type: String
      end

      def credit_card
        @credit_card ||= CreditCardModel.new
      end

      def test_valid?
  
    
      def test_valid?
        credit_card.valid?
        assert(credit_card.errors[:number].present?)
        assert(credit_card.errors[:cvv].present?)

        credit_card.number = '111AFA11$F11AF'
        credit_card.valid?
        refute(credit_card.errors[:number].blank?)

        credit_card.number = nil
        credit_card.token = '1234'
        credit_card.valid?
        assert(credit_card.errors[:number].blank?)

        credit_card.month = 1
        credit_card.year = 1990
        credit_card.valid?
        refute(credit_card.errors[:expiration_date].blank?)

        credit_card.month = 1
        credit_card.year = Time.current.year + 5
        credit_card.valid?
        assert(credit_card.errors[:expiration_date].blank?)

        credit_card.month = Time.current.month
        credit_card.year = Time.current.year
        credit_card.valid?
        assert(credit_card.errors[:expiration_date].blank?)

        credit_card.valid?
        assert(credit_card.errors[:first_name].present?)
        assert(credit_card.errors[:last_name].present?)

        credit_card.number = 1
        credit_card.valid?
        assert(credit_card.display_number.present?)
        assert(credit_card.issuer.present?)

        Workarea.config.credit_card_issuers.delete('american_express')
        credit_card.number = 378282246310005 # amex test number
        refute(credit_card.valid?, 'valid')
        assert(credit_card.errors[:base].present?, 'no errors')
      end