diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 18:18:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 18:18:33 +0000 |
commit | f64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch) | |
tree | a2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /spec/views/projects/empty.html.haml_spec.rb | |
parent | bfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff) | |
download | gitlab-ce-f64a639bcfa1fc2bc89ca7db268f594306edfd7c.tar.gz |
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'spec/views/projects/empty.html.haml_spec.rb')
-rw-r--r-- | spec/views/projects/empty.html.haml_spec.rb | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/spec/views/projects/empty.html.haml_spec.rb b/spec/views/projects/empty.html.haml_spec.rb index 6762dcd22d5..de83722160e 100644 --- a/spec/views/projects/empty.html.haml_spec.rb +++ b/spec/views/projects/empty.html.haml_spec.rb @@ -79,41 +79,4 @@ RSpec.describe 'projects/empty' do it_behaves_like 'no invite member info' end end - - context 'when rendering with the layout' do - subject(:render_page) { render template: 'projects/empty.html.haml', layout: 'layouts/project' } - - describe 'invite team members' do - before do - allow(view).to receive(:session).and_return({}) - allow(view).to receive(:current_user_mode).and_return(Gitlab::Auth::CurrentUserMode.new(user)) - allow(view).to receive(:current_user).and_return(user) - allow(view).to receive(:experiment_enabled?).and_return(false) - end - - context 'when invite team members is not available in sidebar' do - before do - allow(view).to receive(:can_invite_members_for_project?).and_return(false) - end - - it 'does not display the js-invite-members-trigger' do - render_page - - expect(rendered).not_to have_selector('.js-invite-members-trigger') - end - end - - context 'when invite team members is available' do - before do - allow(view).to receive(:can_invite_members_for_project?).and_return(true) - end - - it 'includes the div for js-invite-members-trigger' do - render_page - - expect(rendered).to have_selector('.js-invite-members-trigger') - end - end - end - end end |