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

28 lines
754 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
require 'spec_helper'
describe 'projects/edit' do
include Devise::Test::ControllerHelpers
2017-09-10 17:25:29 +05:30
let(:project) { create(:project) }
2017-08-17 22:00:37 +05:30
let(:user) { create(:admin) }
before do
assign(:project, project)
allow(controller).to receive(:current_user).and_return(user)
2018-03-17 18:26:18 +05:30
allow(view).to receive_messages(current_user: user,
can?: true,
current_application_settings: Gitlab::CurrentSettings.current_application_settings)
2017-08-17 22:00:37 +05:30
end
2018-03-17 18:26:18 +05:30
context 'project export disabled' do
it 'does not display the project export option' do
stub_application_setting(project_export_enabled?: false)
2017-08-17 22:00:37 +05:30
render
2018-03-17 18:26:18 +05:30
expect(rendered).not_to have_content('Export project')
2017-08-17 22:00:37 +05:30
end
end
end