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`).
This commit is contained in:
Jan Provaznik 2018-06-16 21:20:58 +02:00
parent 7b1eb2a669
commit 20adfb5369

View file

@ -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