Merge branch 'fix-depr-warn' into 'master'
resolve deprecation warnings Closes #27423 See merge request !8855
This commit is contained in:
commit
ee59a64b20
|
@ -84,7 +84,7 @@ class GroupsController < Groups::ApplicationController
|
||||||
if Groups::UpdateService.new(@group, current_user, group_params).execute
|
if Groups::UpdateService.new(@group, current_user, group_params).execute
|
||||||
redirect_to edit_group_path(@group), notice: "Group '#{@group.name}' was successfully updated."
|
redirect_to edit_group_path(@group), notice: "Group '#{@group.name}' was successfully updated."
|
||||||
else
|
else
|
||||||
@group.reset_path!
|
@group.restore_path!
|
||||||
|
|
||||||
render action: "edit"
|
render action: "edit"
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
title: resolve deprecation warnings
|
||||||
|
merge_request: 8855
|
||||||
|
author: Adam Pahlevi
|
|
@ -117,7 +117,7 @@ describe ProjectMember, models: true do
|
||||||
users = create_list(:user, 2)
|
users = create_list(:user, 2)
|
||||||
|
|
||||||
described_class.add_users_to_projects(
|
described_class.add_users_to_projects(
|
||||||
[projects.first.id, projects.second],
|
[projects.first.id, projects.second.id],
|
||||||
[users.first.id, users.second],
|
[users.first.id, users.second],
|
||||||
described_class::MASTER)
|
described_class::MASTER)
|
||||||
|
|
||||||
|
|
|
@ -8,14 +8,14 @@ describe ProjectDestroyWorker do
|
||||||
|
|
||||||
describe "#perform" do
|
describe "#perform" do
|
||||||
it "deletes the project" do
|
it "deletes the project" do
|
||||||
subject.perform(project.id, project.owner, {})
|
subject.perform(project.id, project.owner.id, {})
|
||||||
|
|
||||||
expect(Project.all).not_to include(project)
|
expect(Project.all).not_to include(project)
|
||||||
expect(Dir.exist?(path)).to be_falsey
|
expect(Dir.exist?(path)).to be_falsey
|
||||||
end
|
end
|
||||||
|
|
||||||
it "deletes the project but skips repo deletion" do
|
it "deletes the project but skips repo deletion" do
|
||||||
subject.perform(project.id, project.owner, { "skip_repo" => true })
|
subject.perform(project.id, project.owner.id, { "skip_repo" => true })
|
||||||
|
|
||||||
expect(Project.all).not_to include(project)
|
expect(Project.all).not_to include(project)
|
||||||
expect(Dir.exist?(path)).to be_truthy
|
expect(Dir.exist?(path)).to be_truthy
|
||||||
|
|
Loading…
Reference in New Issue