Welcome to mirror list, hosted at ThFree Co, Russian Federation.

empty_search_results_spec.rb « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e79586bef68484ccc42c94811b32648e4e0a7e3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Gitlab::EmptySearchResults do
  subject { described_class.new }

  describe '#objects' do
    it 'returns an empty array' do
      expect(subject.objects).to match_array([])
    end
  end

  describe '#formatted_count' do
    it 'returns a zero' do
      expect(subject.formatted_count).to eq('0')
    end
  end

  describe '#highlight_map' do
    it 'returns an empty hash' do
      expect(subject.highlight_map).to eq({})
    end
  end

  describe '#aggregations' do
    it 'returns an empty array' do
      expect(subject.objects).to match_array([])
    end
  end
end