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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-26 18:08:56 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-26 18:08:56 +0300
commit17ab40ca089e1aef61a83f77ab6df62a72f6ce06 (patch)
tree8eb149293eee90ec2750b6ac5e46a111a806424e /spec/models/error_tracking/project_error_tracking_setting_spec.rb
parent66d4203791a01fdedf668a78818a229ea2c07aad (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/error_tracking/project_error_tracking_setting_spec.rb')
-rw-r--r--spec/models/error_tracking/project_error_tracking_setting_spec.rb21
1 files changed, 20 insertions, 1 deletions
diff --git a/spec/models/error_tracking/project_error_tracking_setting_spec.rb b/spec/models/error_tracking/project_error_tracking_setting_spec.rb
index e81480ab88f..ef3679da71f 100644
--- a/spec/models/error_tracking/project_error_tracking_setting_spec.rb
+++ b/spec/models/error_tracking/project_error_tracking_setting_spec.rb
@@ -8,7 +8,7 @@ describe ErrorTracking::ProjectErrorTrackingSetting do
let_it_be(:project) { create(:project) }
- subject { create(:project_error_tracking_setting, project: project) }
+ subject(:setting) { create(:project_error_tracking_setting, project: project) }
describe 'Associations' do
it { is_expected.to belong_to(:project) }
@@ -453,4 +453,23 @@ describe ErrorTracking::ProjectErrorTrackingSetting do
end
end
end
+
+ describe '#expire_issues_cache', :use_clean_rails_redis_caching do
+ let(:issues) { [:some, :issues] }
+ let(:opt) { 'list_issues' }
+ let(:params) { { issue_status: 'unresolved', limit: 20, sort: 'last_seen' } }
+
+ before do
+ start_reactive_cache_lifetime(subject, opt, params.stringify_keys)
+ stub_reactive_cache(subject, issues, opt, params.stringify_keys)
+ end
+
+ it 'clears the cache' do
+ expect(subject.list_sentry_issues(params)).to eq(issues)
+
+ subject.expire_issues_cache
+
+ expect(subject.list_sentry_issues(params)).to eq(nil)
+ end
+ end
end