summaryrefslogtreecommitdiff
path: root/spec/views/projects/issues/_related_branches.html.haml_spec.rb
blob: 78af61f15a719e9a02f74d6cd57be4b8650f7bea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'spec_helper'

describe 'projects/issues/_related_branches' do
  include Devise::TestHelpers

  let(:project) { create(:project) }
  let(:branch) { project.repository.find_branch('feature') }
  let!(:pipeline) { create(:ci_pipeline, project: project, sha: branch.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