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

attention_request_cache_invalidation_examples.rb « shared_examples « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7fe696abc69b714cabc07fecd1f3c2ec268234e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

RSpec.shared_examples 'invalidates attention request cache' do
  it 'invalidates the merge requests requiring attention count' do
    cache_mock = double

    users.each do |user|
      expect(cache_mock).to receive(:delete).with(['users', user.id, 'attention_requested_open_merge_requests_count'])
    end

    allow(Rails).to receive(:cache).and_return(cache_mock)

    service.execute
  end
end