summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/web_ide_commits_counter_spec.rb
blob: c51889a1c63e7faa9bf8306e1a280b8db21a782c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 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