summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/sentry_spec.rb
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-11-28 18:02:23 +0100
committerKamil Trzciński <ayufan@ayufan.eu>2019-01-02 18:59:23 +0100
commit83aa0ea8230018d37f2a0ad562418c3114b6fa81 (patch)
tree1bc1d3cdd80153d454e99ab4b550e35fb6fbbc61 /spec/lib/gitlab/sentry_spec.rb
parent1a83d9387f6db91f2adae5c3d66c6e21077967bc (diff)
downloadgitlab-ce-improve-exception-handling.tar.gz
Refactor Sentry handlingimprove-exception-handling
Diffstat (limited to 'spec/lib/gitlab/sentry_spec.rb')
-rw-r--r--spec/lib/gitlab/sentry_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/lib/gitlab/sentry_spec.rb b/spec/lib/gitlab/sentry_spec.rb
index 1128eaf8560..faae9f1577c 100644
--- a/spec/lib/gitlab/sentry_spec.rb
+++ b/spec/lib/gitlab/sentry_spec.rb
@@ -11,7 +11,7 @@ describe Gitlab::Sentry do
end
end
- describe '.track_exception' do
+ describe '.handle_exception' do
let(:exception) { RuntimeError.new('boom') }
before do
@@ -20,7 +20,7 @@ describe Gitlab::Sentry do
it 'raises the exception if it should' do
expect(described_class).to receive(:should_raise_for_dev?).and_return(true)
- expect { described_class.track_exception(exception) }
+ expect { described_class.handle_exception(exception) }
.to raise_error(RuntimeError)
end
@@ -45,7 +45,7 @@ describe Gitlab::Sentry do
tags: a_hash_including(expected_tags),
extra: a_hash_including(expected_extras))
- described_class.track_exception(
+ described_class.handle_exception(
exception,
issue_url: 'http://gitlab.com/gitlab-org/gitlab-ce/issues/1',
extra: { some_other_info: 'info' }
@@ -55,12 +55,12 @@ describe Gitlab::Sentry do
it 'sets the context' do
expect(described_class).to receive(:context)
- described_class.track_exception(exception)
+ described_class.handle_exception(exception)
end
end
end
- context '.track_acceptable_exception' do
+ context '.report_exception' do
let(:exception) { RuntimeError.new('boom') }
before do
@@ -83,7 +83,7 @@ describe Gitlab::Sentry do
tags: a_hash_including(expected_tags),
extra: a_hash_including(expected_extras))
- described_class.track_acceptable_exception(
+ described_class.report_exception(
exception,
issue_url: 'http://gitlab.com/gitlab-org/gitlab-ce/issues/1',
extra: { some_other_info: 'info' }