2019-10-21 11:05:58 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2019-11-20 10:06:39 -05:00
|
|
|
describe 'projects/show.html.haml' do
|
2019-10-21 11:05:58 -04:00
|
|
|
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
|
2019-11-18 13:06:53 -05:00
|
|
|
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
|
|
|
|
|
2019-10-21 11:05:58 -04:00
|
|
|
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
|