diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-04 15:11:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-04 15:11:11 +0300 |
commit | d5d47b45ddddcef0f8fc80a35ca7a8a2a0765fd1 (patch) | |
tree | 3a595b7b17458fca99dcf3e808dc4c4c49ac0620 /spec/views/groups | |
parent | b0a5a92e8349ef7b6284f7e5571620e21bed1cad (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views/groups')
-rw-r--r-- | spec/views/groups/show.html.haml_spec.rb | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/spec/views/groups/show.html.haml_spec.rb b/spec/views/groups/show.html.haml_spec.rb deleted file mode 100644 index a53aab43c18..00000000000 --- a/spec/views/groups/show.html.haml_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe 'groups/show.html.haml' do - let_it_be(:user) { build(:user) } - let_it_be(:group) { create(:group) } - - before do - assign(:group, group) - end - - context 'when rendering with the layout' do - subject(:render_page) { render template: 'groups/show.html.haml', layout: 'layouts/group' } - - 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) - allow(view).to receive(:group_path).and_return('') - allow(view).to receive(:group_shared_path).and_return('') - allow(view).to receive(:group_archived_path).and_return('') - end - - context 'when invite team members is not available in sidebar' do - before do - allow(view).to receive(:can_invite_members_for_group?).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_group?).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 |