diff options
author | Nick Thomas <nick@gitlab.com> | 2018-05-16 15:34:31 +0300 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2018-05-16 16:51:06 +0300 |
commit | 1e54d62788d1152685a8f984831ff4108e8a21cc (patch) | |
tree | f5e6863fb9fb2c5c689ebdcd5a448c8da03b813f /spec | |
parent | 3bd98f0be0c7b307af592d14610b307fa12227a0 (diff) |
Merge branch 'fix-metrics-doorkeeper' into 'master'
Fix GitLab Performance Monitoring content types for Doorkeeper
Closes #46412
See merge request gitlab-org/gitlab-ce!18984
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/metrics/web_transaction_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/lib/gitlab/metrics/web_transaction_spec.rb b/spec/lib/gitlab/metrics/web_transaction_spec.rb index c07b33a039a..6eb0600f49e 100644 --- a/spec/lib/gitlab/metrics/web_transaction_spec.rb +++ b/spec/lib/gitlab/metrics/web_transaction_spec.rb @@ -180,11 +180,11 @@ describe Gitlab::Metrics::WebTransaction do end context 'when request goes to ActionController' do - let(:request_format) { :html } + let(:request) { double(:request, format: double(:format, ref: :html)) } before do klass = double(:klass, name: 'TestController') - controller = double(:controller, class: klass, action_name: 'show', request_format: request_format) + controller = double(:controller, class: klass, action_name: 'show', request: request) env['action_controller.instance'] = controller end @@ -195,7 +195,7 @@ describe Gitlab::Metrics::WebTransaction do end context 'when the response content type is not :html' do - let(:request_format) { :json } + let(:request) { double(:request, format: double(:format, ref: :json)) } it 'appends the mime type to the transaction action' do expect(transaction.labels).to eq({ controller: 'TestController', action: 'show.json' }) |