diff options
Diffstat (limited to 'spec/controllers/admin/groups_controller_spec.rb')
-rw-r--r-- | spec/controllers/admin/groups_controller_spec.rb | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/spec/controllers/admin/groups_controller_spec.rb b/spec/controllers/admin/groups_controller_spec.rb index 0dad95e418f..647fce0ecef 100644 --- a/spec/controllers/admin/groups_controller_spec.rb +++ b/spec/controllers/admin/groups_controller_spec.rb @@ -12,12 +12,12 @@ describe Admin::GroupsController do describe 'DELETE #destroy' do it 'schedules a group destroy' do Sidekiq::Testing.fake! do - expect { delete :destroy, id: project.group.path }.to change(GroupDestroyWorker.jobs, :size).by(1) + expect { delete :destroy, params: { id: project.group.path } }.to change(GroupDestroyWorker.jobs, :size).by(1) end end it 'redirects to the admin group path' do - delete :destroy, id: project.group.path + delete :destroy, params: { id: project.group.path } expect(response).to redirect_to(admin_groups_path) end @@ -27,9 +27,11 @@ describe Admin::GroupsController do let(:group_user) { create(:user) } it 'adds user to members' do - put :members_update, id: group, - user_ids: group_user.id, - access_level: Gitlab::Access::GUEST + put :members_update, params: { + id: group, + user_ids: group_user.id, + access_level: Gitlab::Access::GUEST + } expect(response).to set_flash.to 'Users were successfully added.' expect(response).to redirect_to(admin_group_path(group)) @@ -37,18 +39,22 @@ describe Admin::GroupsController do end it 'can add unlimited members' do - put :members_update, id: group, - user_ids: 1.upto(1000).to_a.join(','), - access_level: Gitlab::Access::GUEST + put :members_update, params: { + id: group, + user_ids: 1.upto(1000).to_a.join(','), + access_level: Gitlab::Access::GUEST + } expect(response).to set_flash.to 'Users were successfully added.' expect(response).to redirect_to(admin_group_path(group)) end it 'adds no user to members' do - put :members_update, id: group, - user_ids: '', - access_level: Gitlab::Access::GUEST + put :members_update, params: { + id: group, + user_ids: '', + access_level: Gitlab::Access::GUEST + } expect(response).to set_flash.to 'No users specified.' expect(response).to redirect_to(admin_group_path(group)) |