diff options
Diffstat (limited to 'spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb')
-rw-r--r-- | spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb | 55 |
1 files changed, 7 insertions, 48 deletions
diff --git a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb index 4de2c011b93..cddff276317 100644 --- a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'layouts/nav/sidebar/_project' do +RSpec.describe 'layouts/nav/sidebar/_project', feature_category: :navigation do let_it_be_with_reload(:project) { create(:project, :repository) } let(:user) { project.first_owner } @@ -67,19 +67,6 @@ RSpec.describe 'layouts/nav/sidebar/_project' do end end - describe 'Learn GitLab' do - it 'has a link to the learn GitLab' do - allow(view).to receive(:learn_gitlab_enabled?).and_return(true) - allow_next_instance_of(Onboarding::Completion) do |onboarding| - expect(onboarding).to receive(:percentage).and_return(20) - end - - render - - expect(rendered).to have_link('Learn GitLab', href: project_learn_gitlab_path(project)) - end - end - describe 'Repository' do it 'has a link to the project tree path' do render @@ -96,24 +83,10 @@ RSpec.describe 'layouts/nav/sidebar/_project' do end describe 'Commits' do - context 'when the use_ref_type_parameter flag is not enabled' do - before do - stub_feature_flags(use_ref_type_parameter: false) - end - - it 'has a link to the project commits path' do - render - - expect(rendered).to have_link('Commits', href: project_commits_path(project, current_ref), id: 'js-onboarding-commits-link') - end - end - - context 'when the use_ref_type_parameter flag is enabled' do - it 'has a link to the fully qualified project commits path' do - render + it 'has a link to the fully qualified project commits path' do + render - expect(rendered).to have_link('Commits', href: project_commits_path(project, current_ref, ref_type: 'heads'), id: 'js-onboarding-commits-link') - end + expect(rendered).to have_link('Commits', href: project_commits_path(project, current_ref, ref_type: 'heads'), id: 'js-onboarding-commits-link') end end @@ -134,24 +107,10 @@ RSpec.describe 'layouts/nav/sidebar/_project' do end describe 'Contributors' do - context 'and the use_ref_type_parameter flag is disabled' do - before do - stub_feature_flags(use_ref_type_parameter: false) - end - - it 'has a link to the project contributors path' do - render - - expect(rendered).to have_link('Contributors', href: project_graph_path(project, current_ref)) - end - end - - context 'and the use_ref_type_parameter flag is enabled' do - it 'has a link to the project contributors path' do - render + it 'has a link to the project contributors path' do + render - expect(rendered).to have_link('Contributors', href: project_graph_path(project, current_ref, ref_type: 'heads')) - end + expect(rendered).to have_link('Contributors', href: project_graph_path(project, current_ref, ref_type: 'heads')) end end |