Commit 29cbb2f0 authored by Douwe Maan's avatar Douwe Maan Committed by Robert Speicher

Update specs.

parent b9305369
......@@ -8,7 +8,7 @@ describe Projects::TransferService do
context 'namespace -> namespace' do
before do
group.add_owner(user)
@result = transfer_project(project, user, new_namespace_id: group.id)
@result = transfer_project(project, user, group)
end
it { expect(@result).to be_truthy }
......@@ -17,7 +17,7 @@ describe Projects::TransferService do
context 'namespace -> no namespace' do
before do
@result = transfer_project(project, user, new_namespace_id: nil)
@result = transfer_project(project, user, nil)
end
it { expect(@result).to eq false }
......@@ -26,14 +26,14 @@ describe Projects::TransferService do
context 'namespace -> not allowed namespace' do
before do
@result = transfer_project(project, user, new_namespace_id: group.id)
@result = transfer_project(project, user, group)
end
it { expect(@result).to eq false }
it { expect(project.namespace).to eq(user.namespace) }
end
def transfer_project(project, user, params)
Projects::TransferService.new(project, user, params).execute
def transfer_project(project, user, new_namespace)
Projects::TransferService.new(project, user).execute(new_namespace)
end
end
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