diff options
author | Stan Hu <stanhu@gmail.com> | 2018-10-14 06:07:12 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-10-15 10:18:04 -0700 |
commit | c6ac04e4da60707a7bf13c796f95844e5409f451 (patch) | |
tree | 241b92c458a0bb1b34b4aa33ac4e9c80967cd849 /spec/features/projects_spec.rb | |
parent | 75b6ed8d2d0591efa19b02173c0524551e95f691 (diff) | |
download | gitlab-ce-c6ac04e4da60707a7bf13c796f95844e5409f451.tar.gz |
Fix commit signature error when project is disabled
When a project is disabled, visiting the home page would show,
"An error occurred while loading commit signatures". This change checks
that the user has permission to view the project to avoid unnecessary
GPG signature lookups.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/50903
Diffstat (limited to 'spec/features/projects_spec.rb')
-rw-r--r-- | spec/features/projects_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/features/projects_spec.rb b/spec/features/projects_spec.rb index 8e310f38a8c..fb766addb31 100644 --- a/spec/features/projects_spec.rb +++ b/spec/features/projects_spec.rb @@ -193,6 +193,23 @@ describe 'Project' do end end + describe 'when the project repository is disabled', :js do + let(:user) { create(:user) } + let(:project) { create(:project, :repository_disabled, :repository, namespace: user.namespace) } + + before do + sign_in(user) + project.add_maintainer(user) + visit project_path(project) + end + + it 'does not show an error' do + wait_for_requests + + expect(page).not_to have_selector('.flash-alert') + end + end + describe 'removal', :js do let(:user) { create(:user) } let(:project) { create(:project, namespace: user.namespace) } |