Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Provaznik <jprovaznik@gitlab.com>2018-06-16 22:20:58 +0300
committerJan Provaznik <jprovaznik@gitlab.com>2018-06-16 22:20:58 +0300
commit20adfb53693879a4b5c29b752fc06a130df18d42 (patch)
tree832c6cb9a87fa7f769560b7be3d4a798a2d49ad8 /spec/lib/gitlab/auth
parent7b1eb2a669ad2a44dbe89d7d289d72870cbd74e7 (diff)
Fix nil formats test
One of the spec files sets `nil` value for env varialbe `action_dispatch.request.formats`. Rather than setting `nil` value, we can delete the `action_dispatch.request.formats` key from `env` (which should be closer to real use case anyway). The reason is that in Rails 5, `formats` method does not set default array of formats if the env key is already set (even if set to `nil`).
Diffstat (limited to 'spec/lib/gitlab/auth')
-rw-r--r--spec/lib/gitlab/auth/user_auth_finders_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/lib/gitlab/auth/user_auth_finders_spec.rb b/spec/lib/gitlab/auth/user_auth_finders_spec.rb
index 136646bd4ee..454ad1589b9 100644
--- a/spec/lib/gitlab/auth/user_auth_finders_spec.rb
+++ b/spec/lib/gitlab/auth/user_auth_finders_spec.rb
@@ -99,7 +99,7 @@ describe Gitlab::Auth::UserAuthFinders do
context 'when the request format is empty' do
it 'the method call does not modify the original value' do
- env['action_dispatch.request.formats'] = nil
+ env.delete('action_dispatch.request.formats')
find_user_from_feed_token