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

module Workarea
  module Search
    class AdminSearchTest < IntegrationTest
      def test_autocomplete
        page = create_page(name: 'foo')

        search = AdminSearch.new(q: 'foo', autocomplete: true)
        assert_equal([page], search.results)
      end

      def test_not_including_navigation_in_results
        Workarea.config.jump_to_navigation.to_a.each do |tuple|
          Workarea::Search::Admin::Navigation.new(tuple).save
        end

        assert_equal(0, AdminSearch.new.total)
      end

      def test_filter_by_creation_date
        one = create_product(id: '1', created_at: Time.new(2016, 8, 24))
        two = create_product(id: '2', created_at: Time.new(2016, 8, 25))

        search = AdminSearch.new(
          created_at_greater_th
    
      def test_default_sort_by_score
        # Unlike other admin searches (primarily indexes), we want searching to
        # default sort by score. Testing scores directly is unreliable so just
        # do a simple check here.
        assert_equal(
          [{ _score: :desc }, { updated_at: :desc }],
          AdminSearch.new.default_admin_sort
        )
      end

      def test_selected_sorting
        results = [
          create_product(name: 'A', variants: []),
          create_page(name: 'B'),
          create_category(name: 'C'),
          create_release(name: 'D')
        ]

        search = AdminSearch.new(sort: 'name_asc')
        assert_equal(results, search.results)
      end

      def test_keyword_matching
        keyword_match = create_product(id: '123-4')
        text_match = create_product(name: '123-4')

        search = AdminSearch.new(q: '123-4')
        assert_equal([keyword_match, text_match], search.results)
      end
    end