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:
parent
7b1eb2a669
commit
20adfb5369
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue