diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-19 15:06:24 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-19 15:06:24 +0000 |
commit | 88542a5e9613c8442a982e65ad5cf13eb33bc541 (patch) | |
tree | 11a65d86e623b443b8a2976cc93cff360e2da8a2 /spec/lib/sentry | |
parent | b570d73ecd31e2ca9cf8c2f1adb056edf2869477 (diff) | |
download | gitlab-ce-88542a5e9613c8442a982e65ad5cf13eb33bc541.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/sentry')
-rw-r--r-- | spec/lib/sentry/client_spec.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/lib/sentry/client_spec.rb b/spec/lib/sentry/client_spec.rb index 8101664d34f..b46fa485f82 100644 --- a/spec/lib/sentry/client_spec.rb +++ b/spec/lib/sentry/client_spec.rb @@ -88,12 +88,13 @@ describe Sentry::Client do describe '#list_issues' do let(:issue_status) { 'unresolved' } let(:limit) { 20 } + let(:search_term) { '' } let(:sentry_api_response) { issues_sample_response } let(:sentry_request_url) { sentry_url + '/issues/?limit=20&query=is:unresolved' } let!(:sentry_api_request) { stub_sentry_request(sentry_request_url, body: sentry_api_response) } - subject { client.list_issues(issue_status: issue_status, limit: limit) } + subject { client.list_issues(issue_status: issue_status, limit: limit, search_term: search_term) } it_behaves_like 'calls sentry api' @@ -202,6 +203,16 @@ describe Sentry::Client do end it_behaves_like 'maps exceptions' + + context 'when search term is present' do + let(:search_term) { 'NoMethodError'} + let(:sentry_request_url) { "#{sentry_url}/issues/?limit=20&query=is:unresolved NoMethodError" } + + it_behaves_like 'calls sentry api' + + it_behaves_like 'has correct return type', Gitlab::ErrorTracking::Error + it_behaves_like 'has correct length', 1 + end end describe '#list_projects' do |