diff options
Diffstat (limited to 'spec/models/sidebars/projects/menus/learn_gitlab/menu_spec.rb')
-rw-r--r-- | spec/models/sidebars/projects/menus/learn_gitlab/menu_spec.rb | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/spec/models/sidebars/projects/menus/learn_gitlab/menu_spec.rb b/spec/models/sidebars/projects/menus/learn_gitlab/menu_spec.rb deleted file mode 100644 index bc1815558d3..00000000000 --- a/spec/models/sidebars/projects/menus/learn_gitlab/menu_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Sidebars::Projects::Menus::LearnGitlab::Menu do - let(:project) { build(:project) } - let(:experiment_enabled) { true } - let(:context) { Sidebars::Projects::Context.new(current_user: nil, container: project, learn_gitlab_experiment_enabled: experiment_enabled) } - - subject { described_class.new(context) } - - it 'does not contain any sub menu' do - expect(subject.instance_variable_get(:@items)).to be_empty - end - - describe '#render?' do - context 'when learn gitlab experiment is enabled' do - it 'returns true' do - expect(subject.render?).to eq true - end - end - - context 'when learn gitlab experiment is disabled' do - let(:experiment_enabled) { false } - - it 'returns false' do - expect(subject.render?).to eq false - end - end - end -end |