Clarify that the diff view setting always comes from the cookie
This invalidates one test, which we've removed.
This commit is contained in:
parent
90a67a76d5
commit
8530ce4c6f
|
@ -83,8 +83,7 @@ class Projects::ApplicationController < ApplicationController
|
|||
end
|
||||
|
||||
def apply_diff_view_cookie!
|
||||
view = params[:view] || cookies[:diff_view]
|
||||
cookies.permanent[:diff_view] = params[:view] = view if view
|
||||
cookies.permanent[:diff_view] = params.delete(:view) if params[:view].present?
|
||||
end
|
||||
|
||||
def builds_enabled
|
||||
|
|
|
@ -300,14 +300,6 @@ describe Projects::MergeRequestsController do
|
|||
|
||||
expect(response.cookies['diff_view']).to eq('parallel')
|
||||
end
|
||||
|
||||
it 'assigns :view param based on cookie' do
|
||||
request.cookies['diff_view'] = 'parallel'
|
||||
|
||||
go
|
||||
|
||||
expect(controller.params[:view]).to eq 'parallel'
|
||||
end
|
||||
end
|
||||
|
||||
describe 'GET commits' do
|
||||
|
|
Loading…
Reference in New Issue