summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/diff/highlight_spec.rb4
-rw-r--r--spec/lib/gitlab/sentry_spec.rb12
-rw-r--r--spec/models/concerns/group_descendant_spec.rb4
3 files changed, 10 insertions, 10 deletions
diff --git a/spec/lib/gitlab/diff/highlight_spec.rb b/spec/lib/gitlab/diff/highlight_spec.rb
index 5d0a603d11d..176aeaec0e5 100644
--- a/spec/lib/gitlab/diff/highlight_spec.rb
+++ b/spec/lib/gitlab/diff/highlight_spec.rb
@@ -103,7 +103,7 @@ describe Gitlab::Diff::Highlight do
end
it 'keeps the original rich line' do
- allow(Gitlab::Sentry).to receive(:track_exception)
+ allow(Gitlab::Sentry).to receive(:handle_exception)
code = %q{+ raise RuntimeError, "System commands must be given as an array of strings"}
@@ -112,7 +112,7 @@ describe Gitlab::Diff::Highlight do
end
it 'reports to Sentry if configured' do
- expect(Gitlab::Sentry).to receive(:track_exception).and_call_original
+ expect(Gitlab::Sentry).to receive(:handle_exception).and_call_original
expect { subject }. to raise_exception(RangeError)
end
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' }
diff --git a/spec/models/concerns/group_descendant_spec.rb b/spec/models/concerns/group_descendant_spec.rb
index 28352d8c961..b59ca24bbf4 100644
--- a/spec/models/concerns/group_descendant_spec.rb
+++ b/spec/models/concerns/group_descendant_spec.rb
@@ -80,7 +80,7 @@ describe GroupDescendant, :nested_groups do
end
it 'tracks the exception when a parent was not preloaded' do
- expect(Gitlab::Sentry).to receive(:track_exception).and_call_original
+ expect(Gitlab::Sentry).to receive(:handle_exception).and_call_original
expect { GroupDescendant.build_hierarchy([subsub_group]) }.to raise_error(ArgumentError)
end
@@ -89,7 +89,7 @@ describe GroupDescendant, :nested_groups do
expected_hierarchy = { parent => { subgroup => subsub_group } }
# this does not raise in production, so stubbing it here.
- allow(Gitlab::Sentry).to receive(:track_exception)
+ allow(Gitlab::Sentry).to receive(:handle_exception)
expect(GroupDescendant.build_hierarchy([subsub_group])).to eq(expected_hierarchy)
end