Skip to content

Commit

Permalink
Update spec/ddtrace/contrib/grape/tracer_spec.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmustin authored Nov 12, 2020
1 parent fe8295e commit 8a972b0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/ddtrace/contrib/grape/tracer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,18 +254,18 @@
end
end

context 'defaults when provided invalid config' do
context 'defaults to >=500 when provided invalid config' do
subject(:response) { post '/base/hard_failure' }
let(:configuration_options) { { error_statuses: 'xxx-499' } }

it 'should handle exceptions' do
expect(response.body).to eq('405 Not Allowed')
expect(spans.length).to eq(1)
expect(spans[0].name).to eq('grape.endpoint_run')
expect(spans[0].status).to eq(1)
expect(spans[0].get_tag('error.stack')).to_not be_nil
expect(spans[0].get_tag('error.type')).to_not be_nil
expect(spans[0].get_tag('error.msg')).to_not be_nil
expect(spans[0].status).to eq(0)
expect(spans[0].get_tag('error.stack')).to be_nil
expect(spans[0].get_tag('error.type')).to be_nil
expect(spans[0].get_tag('error.msg')).to be_nil
end
end
end
Expand Down

0 comments on commit 8a972b0

Please sign in to comment.