diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-13 00:10:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-13 00:10:53 +0300 |
commit | 74cb1a1df361969e97d1a85683c1dfca5ac8cad1 (patch) | |
tree | ae688dc2ce754a5115b39d7fad5d171883e723f5 /spec/views | |
parent | 50b113507b3b03bdce4753ba3ff3ffb53d21f756 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/shared/snippets/_snippet.html.haml_spec.rb | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/spec/views/shared/snippets/_snippet.html.haml_spec.rb b/spec/views/shared/snippets/_snippet.html.haml_spec.rb index 71ef97b0448..712021ec1e1 100644 --- a/spec/views/shared/snippets/_snippet.html.haml_spec.rb +++ b/spec/views/shared/snippets/_snippet.html.haml_spec.rb @@ -49,37 +49,4 @@ RSpec.describe 'shared/snippets/_snippet.html.haml' do expect(rendered).not_to have_selector('span.file_count') end end - - context 'spam icon and tooltip', feature_category: :insider_threat do - context 'when the author of the snippet is not banned' do - before do - render 'shared/snippets/snippet', snippet: snippet - end - - it 'does not render spam icon' do - expect(rendered).not_to have_css('[data-testid="spam-icon"]') - end - - it 'does not render tooltip' do - expect(rendered).not_to have_selector("span.has-tooltip") - end - end - - context 'when the author of the snippet is banned' do - let_it_be(:banned_user) { create(:user, :banned) } - let_it_be(:snippet) { create(:snippet, author: banned_user) } - - before do - render 'shared/snippets/snippet', snippet: snippet - end - - it 'renders spam icon' do - expect(rendered).to have_css('[data-testid="spam-icon"]') - end - - it 'renders tooltip' do - expect(rendered).to have_selector("span.has-tooltip[title='This snippet is hidden because its author has been banned']") - end - end - end end |