BigW Consortium Gitlab

_related_branches.html.haml_spec.rb 617 Bytes
Newer Older
1 2 3
require 'spec_helper'

describe 'projects/issues/_related_branches' do
4
  include Devise::Test::ControllerHelpers
5

6
  let(:project) { create(:project, :repository) }
7
  let(:branch) { project.repository.find_branch('feature') }
8
  let!(:pipeline) { create(:ci_pipeline, project: project, sha: branch.dereferenced_target.id, ref: 'feature') }
9 10 11 12 13 14 15 16 17 18 19 20 21

  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