diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-22 18:08:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-22 18:08:48 +0300 |
commit | 180cd023a11c0eb413ad0de124d9758ea25672bd (patch) | |
tree | 63d77be00a22dc637daa0b6d5b644e230f5f4890 /spec/workers | |
parent | be3e24ea3c9f497efde85900df298ce9bc42fce8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/error_tracking_issue_link_worker_spec.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/spec/workers/error_tracking_issue_link_worker_spec.rb b/spec/workers/error_tracking_issue_link_worker_spec.rb index cf16e4a0803..b9206e7e12c 100644 --- a/spec/workers/error_tracking_issue_link_worker_spec.rb +++ b/spec/workers/error_tracking_issue_link_worker_spec.rb @@ -40,14 +40,17 @@ describe ErrorTrackingIssueLinkWorker do end end - shared_examples_for 'terminates after one API request' do + shared_examples_for 'attempts to create a link via plugin' do it 'takes no action' do expect_next_instance_of(Sentry::Client) do |client| expect(client).to receive(:repos).with('sentry-org').and_return([repo]) + expect(client) + .to receive(:create_issue_link) + .with(nil, sentry_issue.sentry_issue_identifier, issue) + .and_return(true) end - expect_any_instance_of(Sentry::Client).not_to receive(:create_issue_link) - expect(subject).to be nil + expect(subject).to be true end end @@ -78,7 +81,7 @@ describe ErrorTrackingIssueLinkWorker do ) end - it_behaves_like 'terminates after one API request' + it_behaves_like 'attempts to create a link via plugin' end context 'when Sentry the GitLab integration is for another project' do @@ -90,7 +93,7 @@ describe ErrorTrackingIssueLinkWorker do ) end - it_behaves_like 'terminates after one API request' + it_behaves_like 'attempts to create a link via plugin' end end end |