Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-04 09:10:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-04 09:10:10 +0300
commit2fa68d3a97fd31bf469050e130f0fc95e8944316 (patch)
tree5c00585c55c44917765c152426cb58c803b4f57f /spec/views
parent21be9646a94e2c145897e25d9c521523d55e1614 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/projects/issues/_related_branches.html.haml_spec.rb24
1 files changed, 13 insertions, 11 deletions
diff --git a/spec/views/projects/issues/_related_branches.html.haml_spec.rb b/spec/views/projects/issues/_related_branches.html.haml_spec.rb
index a6817e3fdbf..6c9bbaea38c 100644
--- a/spec/views/projects/issues/_related_branches.html.haml_spec.rb
+++ b/spec/views/projects/issues/_related_branches.html.haml_spec.rb
@@ -5,23 +5,25 @@ require 'spec_helper'
describe 'projects/issues/_related_branches' do
include Devise::Test::ControllerHelpers
- let(:user) { create(:user) }
- let(:project) { create(:project, :repository) }
- let(:branch) { project.repository.find_branch('feature') }
- let!(:pipeline) { create(:ci_pipeline, project: project, sha: branch.dereferenced_target.id, ref: 'feature') }
+ let(:pipeline) { build(:ci_pipeline, :success) }
+ let(:status) { pipeline.detailed_status(build(:user)) }
before do
- assign(:project, project)
- assign(:related_branches, ['feature'])
-
- project.add_developer(user)
- allow(view).to receive(:current_user).and_return(user)
+ assign(:related_branches, [
+ { name: 'other', link: 'link-to-other', pipeline_status: nil },
+ { name: 'feature', link: 'link-to-feature', pipeline_status: status }
+ ])
render
end
- it 'shows the related branches with their build status' do
- expect(rendered).to match('feature')
+ it 'shows the related branches with their build status', :aggregate_failures do
+ expect(rendered).to have_text('feature')
+ expect(rendered).to have_text('other')
+ expect(rendered).to have_link(href: 'link-to-feature')
+ expect(rendered).to have_link(href: 'link-to-other')
expect(rendered).to have_css('.related-branch-ci-status')
+ expect(rendered).to have_css('.ci-status-icon')
+ expect(rendered).to have_css('.related-branch-info')
end
end