Commit 5ce2f847 authored by Phil Hughes's avatar Phil Hughes

Merge branch '39821-fix-commits-list-with-multi-file-editor' into 'master'

Fix commits list 500 with multi-file editor new_repo cookie

Closes #39821

See merge request gitlab-org/gitlab-ce!15502
parents acae8ddb 2d980cb7
- show_create = local_assigns.fetch(:show_create, false)
- show_new_branch_form = show_new_repo? && show_create && can?(current_user, :push_code, @project) - show_new_branch_form = show_new_repo? && show_create && can?(current_user, :push_code, @project)
- dropdown_toggle_text = @ref || @project.default_branch - dropdown_toggle_text = @ref || @project.default_branch
= form_tag switch_project_refs_path(@project), method: :get, class: "project-refs-form" do = form_tag switch_project_refs_path(@project), method: :get, class: "project-refs-form" do
......
---
title: Fix commits page throwing 500 when the multi-file editor was enabled
merge_request: 15502
author:
type: fixed
...@@ -200,5 +200,12 @@ describe 'Commits' do ...@@ -200,5 +200,12 @@ describe 'Commits' do
expect(page).to have_content("committed #{commit.committed_date.strftime("%b %d, %Y")}") expect(page).to have_content("committed #{commit.committed_date.strftime("%b %d, %Y")}")
end end
end end
it 'shows the ref switcher with the multi-file editor enabled', :js do
set_cookie('new_repo', 'true')
visit project_commits_path(project, branch_name)
expect(find('.js-project-refs-dropdown')).to have_content branch_name
end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment