diff options
Diffstat (limited to 'spec/features/projects/tags')
-rw-r--r-- | spec/features/projects/tags/user_views_tags_spec.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/features/projects/tags/user_views_tags_spec.rb b/spec/features/projects/tags/user_views_tags_spec.rb index e1962ad3df5..dfb5d5d9221 100644 --- a/spec/features/projects/tags/user_views_tags_spec.rb +++ b/spec/features/projects/tags/user_views_tags_spec.rb @@ -2,6 +2,36 @@ require 'spec_helper' RSpec.describe 'User views tags', :feature do + context 'with html' do + let(:project) { create(:project, :repository, visibility_level: Gitlab::VisibilityLevel::PUBLIC) } + let(:user) { create(:user) } + let(:tag_name) { "stable" } + let!(:release) { create(:release, project: project, tag: tag_name) } + + before do + project.add_developer(user) + project.repository.add_tag(user, tag_name, project.default_branch_or_main) + + sign_in(user) + end + + shared_examples 'renders the tag index page' do + it do + visit project_tags_path(project) + + expect(page).to have_content tag_name + end + end + + it_behaves_like 'renders the tag index page' + + context 'when tag name contains a slash' do + let(:tag_name) { "stable/v0.1" } + + it_behaves_like 'renders the tag index page' + end + end + context 'rss' do shared_examples 'has access to the tags RSS feed' do it do |