debian-mirror-gitlab/spec/views/projects/issues/_related_branches.html.haml_spec.rb

26 lines
740 B
Ruby
Raw Normal View History

2016-09-13 17:45:13 +05:30
require 'spec_helper'
describe 'projects/issues/_related_branches' do
2016-11-03 12:29:30 +05:30
include Devise::Test::ControllerHelpers
2016-09-13 17:45:13 +05:30
2019-02-02 18:00:53 +05:30
let(:user) { create(:user) }
2017-08-17 22:00:37 +05:30
let(:project) { create(:project, :repository) }
2016-09-13 17:45:13 +05:30
let(:branch) { project.repository.find_branch('feature') }
2016-11-24 13:41:30 +05:30
let!(:pipeline) { create(:ci_pipeline, project: project, sha: branch.dereferenced_target.id, ref: 'feature') }
2016-09-13 17:45:13 +05:30
before do
assign(:project, project)
assign(:related_branches, ['feature'])
2019-02-02 18:00:53 +05:30
project.add_developer(user)
allow(view).to receive(:current_user).and_return(user)
2016-09-13 17:45:13 +05:30
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