diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-06 15:11:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-06 15:11:40 +0300 |
commit | 0d1b0d5d03389eea2a4435eea47ec0a37cce9b26 (patch) | |
tree | f1e693f29ed5cdcebaf9424b1b98ffe12030ad13 /spec/views/projects | |
parent | b02d831a00f9f87b95174806b4d04a800001dc38 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views/projects')
-rw-r--r-- | spec/views/projects/tags/index.html.haml_spec.rb | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/spec/views/projects/tags/index.html.haml_spec.rb b/spec/views/projects/tags/index.html.haml_spec.rb index 2702ab9e2a9..ebd526284d1 100644 --- a/spec/views/projects/tags/index.html.haml_spec.rb +++ b/spec/views/projects/tags/index.html.haml_spec.rb @@ -3,10 +3,11 @@ require 'spec_helper' RSpec.describe 'projects/tags/index.html.haml' do - let(:project) { create(:project, :repository) } - let(:tags) { TagsFinder.new(project.repository, {}).execute } - let(:git_tag) { project.repository.tags.last } - let(:release) { create(:release, project: project, sha: git_tag.target_commit.sha) } + let_it_be(:project) { create(:project, :repository) } + let_it_be(:tags) { project.repository.tags } + let_it_be(:git_tag) { project.repository.tags.last } + let_it_be(:release) { create(:release, project: project, sha: git_tag.target_commit.sha) } + let(:pipeline) { create(:ci_pipeline, :success, project: project, ref: git_tag.name, sha: release.sha) } before do @@ -86,4 +87,17 @@ RSpec.describe 'projects/tags/index.html.haml' do expect(page.all('.tags .content-list li')).not_to have_css 'svg.s24' end end + + context 'when Gitaly is unavailable' do + it 'renders an error' do + assign(:tags_loading_error, GRPC::Unavailable.new) + + content = render + + expect(content).to include("Unable to load tags") + expect(content).to include( + "The git server, Gitaly, is not available at this time. Please contact your administrator." + ) + end + end end |