summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-09-10 23:36:41 -0700
committerStan Hu <stanhu@gmail.com>2017-09-10 23:36:41 -0700
commit04ea3e3a745543765ca40d02ae960383e669470d (patch)
treec8b9727128108a89342b7509a7480a94a480c0fb
parent30624ef1c1062182c824d8036e377c4bf6fdce52 (diff)
downloadgitlab-ce-sh-fix-api-exception-handling.tar.gz
Fix spec with Sentry context in API exception handlersh-fix-api-exception-handling
-rw-r--r--spec/requests/api/helpers_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/requests/api/helpers_spec.rb b/spec/requests/api/helpers_spec.rb
index d4006fe71a2..b32c7b21ee0 100644
--- a/spec/requests/api/helpers_spec.rb
+++ b/spec/requests/api/helpers_spec.rb
@@ -449,7 +449,7 @@ describe API::Helpers do
exception = RuntimeError.new('test error')
allow(exception).to receive(:backtrace).and_return(caller)
- expect_any_instance_of(self.class).to receive(:sentry_context)
+ expect(Gitlab::Sentry).to receive(:context).with(nil).and_call_original
expect(Raven).to receive(:capture_exception).with(exception)
handle_api_exception(exception)