fa3bbd449e
When we updated gitlab_git to 10.4.1, `tag.target` changed from pointing to the sha of the tag to the sha of the commit the tag points to. The problem is that only annotated tags have `object_sha`s, lightweight tags don't (it's nil), so (only) in their case we still need to use `tag.target`.
21 lines
604 B
Ruby
21 lines
604 B
Ruby
require 'spec_helper'
|
|
|
|
describe 'projects/issues/_related_branches' do
|
|
include Devise::Test::ControllerHelpers
|
|
|
|
let(:project) { create(:project) }
|
|
let(:branch) { project.repository.find_branch('feature') }
|
|
let!(:pipeline) { create(:ci_pipeline, project: project, sha: branch.dereferenced_target.id, ref: 'feature') }
|
|
|
|
before do
|
|
assign(:project, project)
|
|
assign(:related_branches, ['feature'])
|
|
|
|
render
|
|
end
|
|
|
|
it 'shows the related branches with their build status' do
|
|
expect(rendered).to match('feature')
|
|
expect(rendered).to have_css('.related-branch-ci-status')
|
|
end
|
|
end
|