diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-05 21:10:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-05 21:10:06 +0300 |
commit | c8419b0227e069a7403f41589f1d0ef690e762f1 (patch) | |
tree | 7009382402811f9e32b448f68f7f90912237aa03 /spec/views | |
parent | 6659634b2bdc3ba362574541985c6852ad1574a4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/groups/_home_panel.html.haml_spec.rb | 6 | ||||
-rw-r--r-- | spec/views/projects/_home_panel.html.haml_spec.rb | 32 |
2 files changed, 0 insertions, 38 deletions
diff --git a/spec/views/groups/_home_panel.html.haml_spec.rb b/spec/views/groups/_home_panel.html.haml_spec.rb index e76862cdaea..ab556a3db01 100644 --- a/spec/views/groups/_home_panel.html.haml_spec.rb +++ b/spec/views/groups/_home_panel.html.haml_spec.rb @@ -9,12 +9,6 @@ RSpec.describe 'groups/_home_panel' do assign(:group, group) end - it 'renders the group ID' do - render - - expect(rendered).to have_content("Group ID: #{group.id}") - end - context 'admin area link' do it 'renders admin area link for admin' do allow(view).to receive(:current_user).and_return(create(:admin)) diff --git a/spec/views/projects/_home_panel.html.haml_spec.rb b/spec/views/projects/_home_panel.html.haml_spec.rb index a35c87cb4b3..0282e149b25 100644 --- a/spec/views/projects/_home_panel.html.haml_spec.rb +++ b/spec/views/projects/_home_panel.html.haml_spec.rb @@ -148,38 +148,6 @@ RSpec.describe 'projects/_home_panel' do end end - context 'project id' do - let(:project) { create(:project) } - let(:user) { create(:user) } - - before do - assign(:project, project) - - allow(view).to receive(:current_user).and_return(user) - allow(project).to receive(:license_anchor_data).and_return(false) - end - - context 'user can read project' do - it 'is shown' do - allow(view).to receive(:can?).with(user, :read_project, project).and_return(true) - - render - - expect(rendered).to have_content("Project ID: #{project.id}") - end - end - - context 'user cannot read project' do - it 'is not shown' do - allow(view).to receive(:can?).with(user, :read_project, project).and_return(false) - - render - - expect(rendered).not_to have_content("Project ID: #{project.id}") - end - end - end - context 'forks' do let(:source_project) { create(:project, :repository) } let(:project) { fork_project(source_project) } |