Welcome to mirror list, hosted at ThFree Co, Russian Federation.

snippets.html.haml_spec.rb « layouts « views « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 581b7a898fa6b271178f33ffa49db25e44c59f5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'layouts/snippets', feature_category: :snippets do
  let(:user) { build_stubbed(:user) }

  before do
    allow(view).to receive(:current_user).and_return(user)
    allow(view).to receive(:current_user_mode).and_return(Gitlab::Auth::CurrentUserMode.new(user))
  end

  describe "sidebar" do
    context "when @snippet is not set" do
      it 'renders no sidebar' do
        render

        expect(rendered).not_to have_css("aside.nav-sidebar")
      end
    end
  end
end