diff options
| author | Rémy Coutable <remy@rymai.me> | 2016-04-22 07:49:46 +0000 |
|---|---|---|
| committer | Rémy Coutable <remy@rymai.me> | 2016-04-22 07:49:46 +0000 |
| commit | 5a8873f362557c4002858fe323d5c346a89c91b3 (patch) | |
| tree | a64e76fa1eca06328a55b087d62ecb5e04ec40d8 /spec/controllers/projects | |
| parent | 988dad46499e22defc4e0b646b4580db23a44925 (diff) | |
| parent | 8530ce4c6fbc411e00cf426f3b3baca74a4370f7 (diff) | |
| download | gitlab-ce-5a8873f362557c4002858fe323d5c346a89c91b3.tar.gz | |
Merge branch 'rs-diff_view' into 'master'
Always read diff_view setting from the cookie
Prior, when the user had their view set to "parallel" and then visited a
merge request's changes tab _without_ passing the `view` parameter via
query string, the view would be parallel but the `Notes` class was
always instantiated with the default value from `diff_view` ("inline"),
resulting in broken markup when the form to add a line note was
dynamically inserted.
The cookie is set whenever the view is changed, so this value should
always be up-to-date.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14557 and https://gitlab.com/gitlab-org/gitlab-ce/issues/15285
See merge request !3732
Diffstat (limited to 'spec/controllers/projects')
| -rw-r--r-- | spec/controllers/projects/merge_requests_controller_spec.rb | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb index c54e83339a1..c0a1f45195f 100644 --- a/spec/controllers/projects/merge_requests_controller_spec.rb +++ b/spec/controllers/projects/merge_requests_controller_spec.rb @@ -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 |
