gitlab-org--gitlab-foss/spec/lib/gitlab/web_ide_commits_counter_spec.rb
Tiago Botelho 1e662293e8 Implements Web IDE commits counter in Redis
This makes a temporary implementation of the
Web IDE commits counter using Redis while
https://gitlab.com/gitlab-org/gitlab-ce/issues/52096
is being discussed further for a more generic
approach to counters
2018-10-03 11:34:48 +01:00

19 lines
497 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::WebIdeCommitsCounter, :clean_gitlab_redis_shared_state do
describe '.increment' do
it 'increments the web ide commits counter by 1' do
expect do
described_class.increment
end.to change { described_class.total_count }.from(0).to(1)
end
end
describe '.total_count' do
it 'returns the total amount of web ide commits' do
expect(described_class.total_count).to eq(0)
end
end
end