diff options
| author | Stan Hu <stanhu@gmail.com> | 2018-05-15 18:25:32 +0000 |
|---|---|---|
| committer | Stan Hu <stanhu@gmail.com> | 2018-05-15 18:25:32 +0000 |
| commit | 728441a4080332d567a881d9ad833c211d6ab643 (patch) | |
| tree | 2722b9e1755e6a9fcafe4bc578826fa7c46b7075 /spec | |
| parent | bdf279b151c2a530155425f352daac0576f1ec60 (diff) | |
| parent | c003337729e6a68df10878f77b11c7a24321df9c (diff) | |
| download | gitlab-ce-728441a4080332d567a881d9ad833c211d6ab643.tar.gz | |
Merge branch 'fix-metrics-content-types' into 'master'
Fix setting Gitlab metrics content types
Closes gitlab-com/infrastructure#3499
See merge request gitlab-org/gitlab-ce!18975
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 1d162f53a13..c07b33a039a 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(:content_type) { 'text/html' } + let(:request_format) { :html } before do klass = double(:klass, name: 'TestController') - controller = double(:controller, class: klass, action_name: 'show', content_type: content_type) + controller = double(:controller, class: klass, action_name: 'show', request_format: request_format) 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(:content_type) { 'application/json' } + let(:request_format) { :json } it 'appends the mime type to the transaction action' do expect(transaction.labels).to eq({ controller: 'TestController', action: 'show.json' }) |
