Commit 906779e6 authored by Rajendra Kadam's avatar Rajendra Kadam

Add url for spec verification

parent 4c20cd08
......@@ -130,13 +130,22 @@ RSpec.describe ::Routing::PseudonymizationHelper do
end
describe 'when it raises exception' do
context 'calls error tracking exception' do
it 'sends error to sentry' do
context 'calls error tracking' do
before do
controller.request.path = '/dashboard/issues'
controller.request.query_string = 'assignee_username=root'
allow(Rails.application.routes).to receive(:recognize_path).and_return({
controller: 'dashboard',
action: 'issues'
})
end
it 'sends error to sentry and returns nil' do
allow(helper).to receive(:mask_params).with(anything).and_raise(ActionController::RoutingError, 'Some routing error')
expect(Gitlab::ErrorTracking).to receive(:track_exception).with(
ActionController::RoutingError,
url: '').and_call_original
url: '/dashboard/issues?assignee_username=root').and_call_original
expect(helper.masked_page_url).to be_nil
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment