diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-14 09:11:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-14 09:11:42 +0300 |
commit | ab4409930970b7974b721fee957baf4f403e51ff (patch) | |
tree | 9dde06a090cb161be401cc05d543b27a8fd4b8c5 /spec | |
parent | 3f2ce963ab6f19c6f4c910406c0b06cf4772fc30 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/groups_controller_spec.rb | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/spec/controllers/groups_controller_spec.rb b/spec/controllers/groups_controller_spec.rb index c127a44a64d..22a406b3197 100644 --- a/spec/controllers/groups_controller_spec.rb +++ b/spec/controllers/groups_controller_spec.rb @@ -42,21 +42,15 @@ RSpec.describe GroupsController, factory_default: :keep do end end - shared_examples 'details view' do - let(:namespace) { group } + shared_examples 'details view as atom' do + let!(:event) { create(:event, project: project) } + let(:format) { :atom } it { is_expected.to render_template('groups/show') } - context 'as atom' do - let!(:event) { create(:event, project: project) } - let(:format) { :atom } - - it { is_expected.to render_template('groups/show') } - - it 'assigns events for all the projects in the group', :sidekiq_might_not_need_inline do - subject - expect(assigns(:events).map(&:id)).to contain_exactly(event.id) - end + it 'assigns events for all the projects in the group' do + subject + expect(assigns(:events).map(&:id)).to contain_exactly(event.id) end end @@ -70,7 +64,9 @@ RSpec.describe GroupsController, factory_default: :keep do subject { get :show, params: { id: group.to_param }, format: format } context 'when the group is not importing' do - it_behaves_like 'details view' + it { is_expected.to render_template('groups/show') } + + it_behaves_like 'details view as atom' it 'tracks page views', :snowplow do subject @@ -115,7 +111,9 @@ RSpec.describe GroupsController, factory_default: :keep do subject { get :details, params: { id: group.to_param }, format: format } - it_behaves_like 'details view' + it { is_expected.to redirect_to(group_path(group)) } + + it_behaves_like 'details view as atom' end describe 'GET edit' do |