Commit 538d1bff authored by Adam Pahlevi Baihaqi's avatar Adam Pahlevi Baihaqi

resolve deprecation warnings

don’t pass AR object, use the ID to avoid depr warning

pass in the id instead of AR object to specs for `ProjectDestroyWorker`
parent d777e6f1
......@@ -84,7 +84,7 @@ class GroupsController < Groups::ApplicationController
if, current_user, group_params).execute
redirect_to edit_group_path(@group), notice: "Group '#{}' was successfully updated."
render action: "edit"
......@@ -117,7 +117,7 @@ describe ProjectMember, models: true do
users = create_list(:user, 2)
[, projects.second],
[, users.second],
......@@ -8,14 +8,14 @@ describe ProjectDestroyWorker do
describe "#perform" do
it "deletes the project" do
subject.perform(, project.owner, {})
subject.perform(,, {})
expect(Project.all).not_to include(project)
expect(Dir.exist?(path)).to be_falsey
it "deletes the project but skips repo deletion" do
subject.perform(, project.owner, { "skip_repo" => true })
subject.perform(,, { "skip_repo" => true })
expect(Project.all).not_to include(project)
expect(Dir.exist?(path)).to be_truthy
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment