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

42 lines
1,009 B
Ruby
Raw Normal View History

2019-12-26 22:10:19 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-01-01 13:55:28 +05:30
describe 'projects/show.html.haml' do
2019-12-26 22:10:19 +05:30
include Devise::Test::ControllerHelpers
let(:user) { create(:admin) }
let(:project) { create(:project, :repository) }
before do
presented_project = project.present(current_user: user)
allow(presented_project).to receive(:default_view).and_return('customize_workflow')
allow(controller).to receive(:current_user).and_return(user)
assign(:project, presented_project)
end
context 'commit signatures' do
context 'with vue tree view enabled' do
it 'are not rendered via js-signature-container' do
render
expect(rendered).not_to have_css('.js-signature-container')
end
end
context 'with vue tree view disabled' do
before do
stub_feature_flags(vue_file_list: false)
end
it 'rendered via js-signature-container' do
render
expect(rendered).to have_css('.js-signature-container')
end
end
end
end