Commit a0b285f7 authored by Sean McGivern's avatar Sean McGivern

Make ContextPayloadProcessor spec more robust

This spec intends to test that we deep merge information from the
application context into the Sentry event. It appears that prior specs
can leak some application context (or some Sentry context), but we can
make the spec more robust _and_ truer to the intent by using `include`
instead of `eq`.
parent e4d50f0d
......@@ -23,10 +23,10 @@ RSpec.describe Gitlab::ErrorTracking::Processor::ContextPayloadProcessor do
end
it 'merges the context payload into event payload', :aggregate_failures do
expect(result_hash[:user]).to eq(ip_address: '127.0.0.1', username: 'root')
expect(result_hash[:user]).to include(ip_address: '127.0.0.1', username: 'root')
expect(result_hash[:tags])
.to eq(priority: 'high',
.to include(priority: 'high',
locale: 'en',
program: 'test',
feature_category: 'feature_a',
......
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