gitlab-org--gitlab-foss/spec/views/projects/edit.html.haml_spec.rb

29 lines
785 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
describe 'projects/edit' do
include Devise::Test::ControllerHelpers
let(:project) { create(:project) }
let(:user) { create(:admin) }
before do
assign(:project, project)
allow(controller).to receive(:current_user).and_return(user)
allow(view).to receive_messages(current_user: user,
can?: true,
current_application_settings: Gitlab::CurrentSettings.current_application_settings)
end
context 'project export disabled' do
it 'does not display the project export option' do
stub_application_setting(project_export_enabled?: false)
render
expect(rendered).not_to have_content('Export project')
end
end
end