diff options
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/projects_helper_spec.rb | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb index fe7aa9894e9..1804a9a99cf 100644 --- a/spec/helpers/projects_helper_spec.rb +++ b/spec/helpers/projects_helper_spec.rb @@ -390,93 +390,6 @@ RSpec.describe ProjectsHelper do end end - describe '#get_project_nav_tabs' do - before do - allow(helper).to receive(:current_user).and_return(user) - allow(helper).to receive(:can?) { true } - end - - subject do - helper.send(:get_project_nav_tabs, project, user) - end - - context 'when builds feature is enabled' do - before do - allow(project).to receive(:builds_enabled?).and_return(true) - end - - it "does include pipelines tab" do - is_expected.to include(:pipelines) - end - end - - context 'when builds feature is disabled' do - before do - allow(project).to receive(:builds_enabled?).and_return(false) - end - - context 'when user has access to builds' do - it "does include pipelines tab" do - is_expected.to include(:pipelines) - end - end - - context 'when user does not have access to builds' do - before do - allow(helper).to receive(:can?) { false } - end - - it "does not include pipelines tab" do - is_expected.not_to include(:pipelines) - end - end - end - - context 'when project has external wiki' do - it 'includes external wiki tab' do - project.create_external_wiki_service(active: true, properties: { 'external_wiki_url' => 'https://gitlab.com' }) - project.reload - - is_expected.to include(:external_wiki) - end - end - - context 'when project does not have external wiki' do - it 'does not include external wiki tab' do - expect(project.external_wiki).to be_nil - is_expected.not_to include(:external_wiki) - end - end - - context 'when project has confluence enabled' do - before do - allow(project).to receive(:has_confluence?).and_return(true) - end - - it { is_expected.to include(:confluence) } - it { is_expected.not_to include(:wiki) } - end - - context 'when project does not have confluence enabled' do - it { is_expected.not_to include(:confluence) } - it { is_expected.to include(:wiki) } - end - - context 'learn gitlab experiment' do - context 'when it is enabled' do - before do - expect(helper).to receive(:learn_gitlab_experiment_enabled?).with(project).and_return(true) - end - - it { is_expected.to include(:learn_gitlab) } - end - - context 'when it is not enabled' do - it { is_expected.not_to include(:learn_gitlab) } - end - end - end - describe '#show_projects' do let(:projects) do Project.all |