summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/usage_data_counters/search_counter_spec.rb
blob: 50a9f980dc72d6a1621613632ecdab7193d8f8d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

require 'spec_helper'

describe Gitlab::UsageDataCounters::SearchCounter, :clean_gitlab_redis_shared_state do
  it 'increments counter and return the total count' do
    expect(described_class.total_navbar_searches_count).to eq(0)

    2.times { described_class.increment_navbar_searches_count }

    expect(described_class.total_navbar_searches_count).to eq(2)
  end
end