blob: 89a03d72a90c420e0cf2ccc8ab6265d01ac31f22 (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'layouts/header/_super_sidebar_logged_out', feature_category: :navigation do
before do
allow(view).to receive(:current_user_mode).and_return(Gitlab::Auth::CurrentUserMode.new(nil))
Feature.enable(:super_sidebar_logged_out)
end
context 'on gitlab.com' do
before do
allow(Gitlab).to receive(:com?).and_return(true)
render
end
it 'renders marketing links' do
expect(rendered).to have_content('Why GitLab')
expect(rendered).to have_content('Pricing')
expect(rendered).to have_content('Contact Sales')
end
end
context 'on self-managed' do
it 'does not render marketing links' do
render
expect(rendered).not_to have_content('Why GitLab')
expect(rendered).not_to have_content('Pricing')
expect(rendered).not_to have_content('Contact Sales')
end
end
it 'renders links to Explore and Sign-in and Register' do
render
expect(rendered).to have_content('Explore')
expect(rendered).to have_content('Sign in')
expect(rendered).to have_content('Register')
end
end
|