debian-mirror-gitlab/spec/lib/gitlab/usage_data_counters/search_counter_spec.rb

14 lines
403 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# 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