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

profile.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: 77474555771db229d54518a20f3e5272fcd00904 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'layouts/profile' do
  let(:user) { create(:user) }

  before do
    allow(view).to receive(:session).and_return({})
    allow(view).to receive(:current_user).and_return(user)
    allow(view).to receive(:current_user_mode).and_return(Gitlab::Auth::CurrentUserMode.new(user))
    allow(view).to receive(:experiment_enabled?).and_return(false)
    allow(view).to receive(:enable_search_settings).and_call_original
  end

  it 'calls enable_search_settings helper with a custom container class' do
    render
    expect(view).to have_received(:enable_search_settings)
                      .with({ locals: { container_class: 'gl-my-5' } })
  end

  it 'displays the search settings entry point' do
    render
    expect(rendered).to include('js-search-settings-app')
  end
end