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: test_record_types.rb
    path of file: ./repos/kbsecret/test
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require_relative "helpers"

# Tests for KBSecret::Record::* and related classes/modules
class KBSecretRecordTypesTest < Minitest::Test
  include Helpers

  def test_type_discovery
    # Record.type? should return true or false based on whether the type exists
    assert KBSecret::Record.type?(:login)
    refute KBSecret::Record.type?(:dfjbgdkgdf)

    # finding the class for a valid typ
    
  def test_environment_record
    temp_session do |sess|
      sess.add_record(:environment, "top-secret-key", "FOO_API", "0xDEADBEEF")
      record = sess["top-secret-key"]

      # we put an environment record in, so we expect an environment record back
      assert_instance_of KBSecret::Record::Environment, record

      # the data fields should be present in data_fields
      # and have the correct sensitivities
      assert_equal %i[variable value], record.data_fields
      refute record.sensitive?(:variable)
      assert record.sensitive?(:value)

      # there are no internal fields in an environment record
      assert_equal %i[variable value], record.external_fields
      refute record.internal?(:variable)
      refute record.internal?(:value)

      # the data fields should be correctly mapped to methods
      assert_equal "FOO_API", record.variable
      assert_equal "0xDEADBEEF", record.value

      # the export and assignment methods should work
      assert_equal "export FOO_API=0xDEADBEEF", record.to_export
      assert_equal "FOO_API=0xDEADBEEF", record.to_assignment

      # changing the fields should work
      record.variable = "BAR_API"
      record.value = "0xFEEDFACE"

      assert_equal "BAR_API", record.variable
      assert_equal "0xFEEDFACE", record.value

      assert_equal "export BAR_API=0xFEEDFACE", record.to_export
      assert_equal "BAR_API=0xFEEDFACE", record.to_assignment

      # loading into the environment should work
      record.load!

      assert_equal "0xFEEDFACE", ENV["BAR_API"]
    end
  end